C API 参考

宏定义

ob_enable_multi_device_sync
OB_EXTENSION_API
OB_EXTENSION_INTERNAL_API
DEPRECATED
OB_LOG_SEVERITY_NONE
OB_FORMAT_RGB888
OB_FORMAT_MJPEG
FORMAT_MJPEG_TO_I420
FORMAT_MJPEG_TO_NV21
FORMAT_MJPEG_TO_RGB888
FORMAT_MJPEG_TO_BGR888
FORMAT_MJPEG_TO_BGRA
OBDeviceIpAddrConfig
ob_device_ip_addr_config
ob_filter_callback
ob_playback_callback
is_ir_sensor(sensor_type)

Check if sensor_type is an IR sensor.

Parameters
  • sensor_type – Sensor type to check

Returns

True if sensor_type is an IR sensor, false otherwise

isIRSensor
is_ir_stream(stream_type)

Check if stream_type is an IR stream.

Parameters
  • stream_type – Stream type to check

Returns

True if stream_type is an IR stream, false otherwise

isIRStream
is_ir_frame(frame_type)

Check if frame_type is an IR frame.

Parameters
  • frame_type – Frame type to check

Returns

True if frame_type is an IR frame, false otherwise

isIRFrame
OB_DEFAULT_DECRYPT_KEY

The default Decrypt Key.

_OB_PROPERTY_H_
OB_PROP_TIMER_RESET_TRIGGLE_OUT_ENABLE_BOOL

结构体

struct ob_device_timestamp_reset_config

The timestamp reset configuration of the device.

struct ob_error

The error class exposed by the SDK, users can get detailed error information according to the error.

struct ob_margin_filter_config

Configuration for depth margin filter.

struct ob_multi_device_sync_config

The synchronization configuration of the device.

struct OBAccelValue

Data structures for accelerometers and gyroscopes.

struct OBBoolPropertyRange

Structure for boolean range.

struct OBCameraDistortion

Structure for distortion parameters.

struct OBCameraIntrinsic

Structure for camera internal parameters.

struct OBCameraParam

Structure for camera parameters.

struct OBCameraParam_V0

Camera parameters.

struct OBColorPoint

3D point structure with color information

struct OBCompressionParams

Compression Params

struct OBD2CTransform

Structure for rotation/transformation.

struct OBDataBundle

Internal API for future publication.

C language: data’s type is a uint8_t pointer, and the user parses data to the destination type. itemTypeSize == 1, dataSize == itemCount;

Note

This data type matches OBCmdVersion of one propertyId. PropertyId has multiple OBCmdVersion, and different OBCmdVersion of this propertyId has different data types. PropertyId and OBCmdVersion match only one data type. itemCount is the number of data types contained in data bytes. C language and C++ have differences.

C++: data’s type is the propertyId and OBCmdVersion’s data type. itemTypeSize = sizeof(T), itemCount = dataSize / itemTypeSize;

struct OBDataChunk

Structure for transmitting data blocks.

struct OBDepthWorkMode

Depth work mode.

struct OBDeviceSyncConfig

Device synchronization configuration.

Deprecated:

This structure is deprecated, please use ob_multi_device_sync_config instead

struct OBDeviceTemperature

Temperature parameters of the device (unit: Celsius)

struct OBFloatPropertyRange

Structure for float range.

struct OBIntPropertyRange

Structure for integer range.

struct OBNetIpConfig

IP address configuration for network devices (IPv4)

struct OBPoint

3D point structure in the SDK

struct OBPropertyItem

Used to describe the characteristics of each property.

struct OBProtocolVersion

Control command protocol version number.

struct OBRect

Rectangle.

struct OBTofExposureThresholdControl

TOF Exposure Threshold.

枚举

enum OBHPStatusCode

senddata or recdata return status type

Values:

enumerator HP_STATUS_OK

success

enumerator HP_STATUS_NO_DEVICE_FOUND

No device found

enumerator HP_STATUS_CONTROL_TRANSFER_FAILED

Transfer failed

enumerator HP_STATUS_UNKNOWN_ERROR

Unknown error

enum OBPermissionType

the permission type of api or property

Values:

enumerator OB_PERMISSION_DENY

no permission

enumerator OB_PERMISSION_READ

can read

enumerator OB_PERMISSION_WRITE

can write

enumerator OB_PERMISSION_READ_WRITE

can read and write

enumerator OB_PERMISSION_ANY

any situation above

enum OBStatus

error code

Values:

enumerator OB_STATUS_OK

status ok

enumerator OB_STATUS_ERROR

status error

enum OBLogSeverity

log level, the higher the level, the stronger the log filter

Values:

enumerator OB_LOG_SEVERITY_DEBUG

debug

enumerator OB_LOG_SEVERITY_INFO

information

enumerator OB_LOG_SEVERITY_WARN

warning

enumerator OB_LOG_SEVERITY_ERROR

error

enumerator OB_LOG_SEVERITY_FATAL

fatal error

enumerator OB_LOG_SEVERITY_OFF

off (close LOG)

enum OBExceptionType

The exception types in the SDK, through the exception type, you can easily determine the specific type of error. For detailed error API interface functions and error logs, please refer to the information of ob_error.

Values:

enumerator OB_EXCEPTION_TYPE_UNKNOWN

Unknown error, an error not clearly defined by the SDK

enumerator OB_EXCEPTION_TYPE_CAMERA_DISCONNECTED

SDK device disconnection exception

enumerator OB_EXCEPTION_TYPE_PLATFORM

An error in the SDK adaptation platform layer means an error in the implementation of a specific system platform

enumerator OB_EXCEPTION_TYPE_INVALID_VALUE

Invalid parameter type exception, need to check input parameter

enumerator OB_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE

Exception caused by API version mismatch

enumerator OB_EXCEPTION_TYPE_NOT_IMPLEMENTED

SDK and firmware have not yet implemented functions

enumerator OB_EXCEPTION_TYPE_IO

SDK access IO exception error

enumerator OB_EXCEPTION_TYPE_MEMORY

SDK access and use memory errors, which means that the frame fails to allocate memory

enumerator OB_EXCEPTION_TYPE_UNSUPPORTED_OPERATION

Unsupported operation type error by SDK or RGBD device

enum OBSensorType

Enumeration value describing the sensor type.

Values:

enumerator OB_SENSOR_UNKNOWN

Unknown type sensor

enumerator OB_SENSOR_IR

IR

enumerator OB_SENSOR_COLOR

Color

enumerator OB_SENSOR_DEPTH

Depth

enumerator OB_SENSOR_ACCEL

Accel

enumerator OB_SENSOR_GYRO

Gyro

enumerator OB_SENSOR_IR_LEFT

left IR

enumerator OB_SENSOR_IR_RIGHT

Right IR

enum OBStreamType

Enumeration value describing the type of data stream.

Values:

enumerator OB_STREAM_UNKNOWN

Unknown type stream

enumerator OB_STREAM_VIDEO

Video stream (infrared, color, depth streams are all video streams)

enumerator OB_STREAM_IR

IR stream

enumerator OB_STREAM_COLOR

color stream

enumerator OB_STREAM_DEPTH

depth stream

enumerator OB_STREAM_ACCEL

Accelerometer data stream

enumerator OB_STREAM_GYRO

Gyroscope data stream

enumerator OB_STREAM_IR_LEFT

Left IR stream

enumerator OB_STREAM_IR_RIGHT

Right IR stream

enum OBFrameType

Enumeration value describing the type of frame.

Values:

enumerator OB_FRAME_UNKNOWN

Unknown frame type

enumerator OB_FRAME_VIDEO

Video frame

enumerator OB_FRAME_IR

IR frame

enumerator OB_FRAME_COLOR

Color frame

enumerator OB_FRAME_DEPTH

Depth frame

enumerator OB_FRAME_ACCEL

Accelerometer data frame

enumerator OB_FRAME_SET

Frame collection (internally contains a variety of data frames)

enumerator OB_FRAME_POINTS

Point cloud frame

enumerator OB_FRAME_GYRO

Gyroscope data frame

enumerator OB_FRAME_IR_LEFT

Left IR frame

enumerator OB_FRAME_IR_RIGHT

Right IR frame

enum OBFormat

Enumeration value describing the pixel format.

Values:

enumerator OB_FORMAT_YUYV

YUYV format

enumerator OB_FORMAT_YUY2

YUY2 format (the actual format is the same as YUYV)

enumerator OB_FORMAT_UYVY

UYVY format

enumerator OB_FORMAT_NV12

NV12 format

enumerator OB_FORMAT_NV21

NV21 format

enumerator OB_FORMAT_MJPG

MJPEG encoding format

enumerator OB_FORMAT_H264

H.264 encoding format

enumerator OB_FORMAT_H265

H.265 encoding format

enumerator OB_FORMAT_Y16

Y16 format, single channel 16-bit depth

enumerator OB_FORMAT_Y8

Y8 format, single channel 8-bit depth

enumerator OB_FORMAT_Y10

Y10 format, single channel 10-bit depth (SDK will unpack into Y16 by default)

enumerator OB_FORMAT_Y11

Y11 format, single channel 11-bit depth (SDK will unpack into Y16 by default)

enumerator OB_FORMAT_Y12

Y12 format, single channel 12-bit depth (SDK will unpack into Y16 by default)

enumerator OB_FORMAT_GRAY

GRAY (the actual format is the same as YUYV)

enumerator OB_FORMAT_HEVC

HEVC encoding format (the actual format is the same as H265)

enumerator OB_FORMAT_I420

I420 format

enumerator OB_FORMAT_ACCEL

Acceleration data format

enumerator OB_FORMAT_GYRO

Gyroscope data format

enumerator OB_FORMAT_POINT

XYZ 3D coordinate point format

enumerator OB_FORMAT_RGB_POINT

XYZ 3D coordinate point format with RGB information

enumerator OB_FORMAT_RLE

RLE pressure test format (SDK will be unpacked into Y16 by default)

enumerator OB_FORMAT_RGB

RGB format (actual RGB888)

enumerator OB_FORMAT_BGR

BGR format (actual BGR888)

enumerator OB_FORMAT_Y14

Y14 format, single channel 14-bit depth (SDK will unpack into Y16 by default)

enumerator OB_FORMAT_BGRA

BGRA format

enumerator OB_FORMAT_COMPRESSED

Compression format

enumerator OB_FORMAT_RVL

RVL pressure test format (SDK will be unpacked into Y16 by default)

enumerator OB_FORMAT_UNKNOWN

unknown format

enum OBUpgradeState

Enumeration value describing the firmware upgrade status.

Values:

enumerator STAT_VERIFY_SUCCESS

Image file verifify success

enumerator STAT_FILE_TRANSFER

file transfer

enumerator STAT_DONE

update completed

enumerator STAT_IN_PROGRESS

upgrade in process

enumerator STAT_START

start the upgrade

enumerator STAT_VERIFY_IMAGE

Image file verification

enumerator ERR_VERIFY

Verification failed

enumerator ERR_PROGRAM

Program execution failed

enumerator ERR_ERASE

Flash parameter failed

enumerator ERR_FLASH_TYPE

Flash type error

enumerator ERR_IMAGE_SIZE

Image file size error

enumerator ERR_OTHER

other errors

enumerator ERR_DDR

DDR access error

enumerator ERR_TIMEOUT

timeout error

enum OBFileTranState

Enumeration value describing the file transfer status.

Values:

enumerator FILE_TRAN_STAT_TRANSFER

File transfer

enumerator FILE_TRAN_STAT_DONE

File transfer succeeded

enumerator FILE_TRAN_STAT_PREPAR

Preparing

enumerator FILE_TRAN_ERR_DDR

DDR access failed

enumerator FILE_TRAN_ERR_NOT_ENOUGH_SPACE

Insufficient target space error

enumerator FILE_TRAN_ERR_PATH_NOT_WRITABLE

Destination path is not writable

enumerator FILE_TRAN_ERR_MD5_ERROR

MD5 checksum error

enumerator FILE_TRAN_ERR_WRITE_FLASH_ERROR

Write flash error

enumerator FILE_TRAN_ERR_TIMEOUT

Timeout error

enum OBDataTranState

Enumeration value describing the data transfer status.

Values:

enumerator DATA_TRAN_STAT_VERIFY_DONE

data verify done

enumerator DATA_TRAN_STAT_STOPPED

data transfer stoped

enumerator DATA_TRAN_STAT_DONE

data transfer completed

enumerator DATA_TRAN_STAT_VERIFYING

data verifying

enumerator DATA_TRAN_STAT_TRANSFERRING

data transferring

enumerator DATA_TRAN_ERR_BUSY

Transmission is busy

enumerator DATA_TRAN_ERR_UNSUPPORTED

Not supported

enumerator DATA_TRAN_ERR_TRAN_FAILED

Transfer failed

enumerator DATA_TRAN_ERR_VERIFY_FAILED

Test failed

enumerator DATA_TRAN_ERR_OTHER

Other errors

enum OBAlignMode

Alignment mode.

Values:

enumerator ALIGN_DISABLE

Turn off alignment

enumerator ALIGN_D2C_HW_MODE

Hardware D2C alignment mode

enumerator ALIGN_D2C_SW_MODE

Software D2C alignment mode

enum OBConvertFormat

Enumeration of format conversion types.

Values:

enumerator FORMAT_YUYV_TO_RGB888

YUYV to RGB888

enumerator FORMAT_I420_TO_RGB888

I420 to RGB888

enumerator FORMAT_NV21_TO_RGB888

NV21 to RGB888

enumerator FORMAT_NV12_TO_RGB888

NV12 to RGB888

enumerator FORMAT_MJPG_TO_I420

MJPG to I420

enumerator FORMAT_RGB888_TO_BGR

RGB888 to BGR

enumerator FORMAT_MJPG_TO_NV21

MJPG to NV21

enumerator FORMAT_MJPG_TO_RGB888

MJPG to RGB888

enumerator FORMAT_MJPG_TO_BGR888

MJPG to BGR888

enumerator FORMAT_MJPG_TO_BGRA

MJPG to BGRA

enumerator FORMAT_UYVY_TO_RGB888

UYVY to RGB888

enumerator FORMAT_BGR_TO_RGB

BGR to RGB

enum OBGyroSampleRate

Enumeration of IMU sample rate values (gyroscope or accelerometer)

Values:

enumerator OB_SAMPLE_RATE_1_5625_HZ

1.5625Hz

enumerator OB_SAMPLE_RATE_3_125_HZ

3.125Hz

enumerator OB_SAMPLE_RATE_6_25_HZ

6.25Hz

enumerator OB_SAMPLE_RATE_12_5_HZ

12.5Hz

enumerator OB_SAMPLE_RATE_25_HZ

25Hz

enumerator OB_SAMPLE_RATE_50_HZ

50Hz

enumerator OB_SAMPLE_RATE_100_HZ

100Hz

enumerator OB_SAMPLE_RATE_200_HZ

200Hz

enumerator OB_SAMPLE_RATE_500_HZ

500Hz

enumerator OB_SAMPLE_RATE_1_KHZ

1KHz

enumerator OB_SAMPLE_RATE_2_KHZ

2KHz

enumerator OB_SAMPLE_RATE_4_KHZ

4KHz

enumerator OB_SAMPLE_RATE_8_KHZ

8KHz

enumerator OB_SAMPLE_RATE_16_KHZ

16KHz

enumerator OB_SAMPLE_RATE_32_KHZ

32Hz

enum OBGyroFullScaleRange

Enumeration of gyroscope ranges.

Values:

enumerator OB_GYRO_FS_16dps

16 degrees per second

enumerator OB_GYRO_FS_31dps

31 degrees per second

enumerator OB_GYRO_FS_62dps

62 degrees per second

enumerator OB_GYRO_FS_125dps

125 degrees per second

enumerator OB_GYRO_FS_250dps

250 degrees per second

enumerator OB_GYRO_FS_500dps

500 degrees per second

enumerator OB_GYRO_FS_1000dps

1000 degrees per second

enumerator OB_GYRO_FS_2000dps

2000 degrees per second

enum OBAccelFullScaleRange

Enumeration of accelerometer ranges.

Values:

enumerator OB_ACCEL_FS_2g

1x the acceleration of gravity

enumerator OB_ACCEL_FS_4g

4x the acceleration of gravity

enumerator OB_ACCEL_FS_8g

8x the acceleration of gravity

enumerator OB_ACCEL_FS_16g

16x the acceleration of gravity

enum OBDepthCroppingMode

Enumeration for depth crop modes.

Values:

enumerator DEPTH_CROPPING_MODE_AUTO

Automatic mode

enumerator DEPTH_CROPPING_MODE_CLOSE

Close crop

enumerator DEPTH_CROPPING_MODE_OPEN

Open crop

enum OBDeviceType

Enumeration for device types.

Values:

enumerator OB_STRUCTURED_LIGHT_MONOCULAR_CAMERA

Monocular structured light camera

enumerator OB_STRUCTURED_LIGHT_BINOCULAR_CAMERA

Binocular structured light camera

enumerator OB_TOF_CAMERA

Time-of-flight camera

enum OBMediaType

Enumeration for types of media to record or playback.

Values:

enumerator OB_MEDIA_COLOR_STREAM

Color stream

enumerator OB_MEDIA_DEPTH_STREAM

Depth stream

enumerator OB_MEDIA_IR_STREAM

Infrared stream

enumerator OB_MEDIA_GYRO_STREAM

Gyroscope stream

enumerator OB_MEDIA_ACCEL_STREAM

Accelerometer stream

enumerator OB_MEDIA_CAMERA_PARAM

Camera parameter

enumerator OB_MEDIA_DEVICE_INFO

Device information

enumerator OB_MEDIA_STREAM_INFO

Stream information

enumerator OB_MEDIA_IR_LEFT_STREAM

Left infrared stream

enumerator OB_MEDIA_IR_RIGHT_STREAM

Right infrared stream

enumerator OB_MEDIA_ALL

All media data types

enum OBMediaState

Enumeration for record playback status.

Values:

enumerator OB_MEDIA_BEGIN

Begin

enumerator OB_MEDIA_PAUSE

Pause

enumerator OB_MEDIA_RESUME

Resume

enumerator OB_MEDIA_END

End

enum OBDepthPrecisionLevel

Enumeration for depth precision levels.

Attention

The depth precision level does not completely determine the depth unit and real precision, and the influence of the data packaging format needs to be considered. The specific unit can be obtained through getValueScale() of DepthFrame

Values:

enumerator OB_PRECISION_1MM

1mm

enumerator OB_PRECISION_0MM8

0.8mm

enumerator OB_PRECISION_0MM4

0.4mm

enumerator OB_PRECISION_0MM1

0.1mm

enumerator OB_PRECISION_0MM2

0.2mm

enumerator OB_PRECISION_0MM5

0.5mm

enumerator OB_PRECISION_0MM05

0.05mm

enumerator OB_PRECISION_UNKNOWN
enumerator OB_PRECISION_COUNT
enum OBTofFilterRange

Enumeration for TOF filter scene ranges.

Values:

enumerator OB_TOF_FILTER_RANGE_CLOSE

Close range

enumerator OB_TOF_FILTER_RANGE_MIDDLE

Middle range

enumerator OB_TOF_FILTER_RANGE_LONG

Long range

enumerator OB_TOF_FILTER_RANGE_DEBUG

Debug range

enum OBCompressionMode

Compression mode.

Values:

enumerator OB_COMPRESSION_LOSSLESS

Lossless compression mode

enumerator OB_COMPRESSION_LOSSY

Lossy compression mode

enum OBSyncMode

Sync mode.

Deprecated:

This define is deprecated, please use ob_multi_device_sync_mode instead

Values:

enumerator OB_SYNC_MODE_CLOSE

Close synchronize mode.

Single device, neither process input trigger signal nor output trigger signal

Each Sensor in a single device automatically triggers

enumerator OB_SYNC_MODE_STANDALONE

Standalone synchronize mode.

Single device, neither process input trigger signal nor output trigger signal

Inside single device, RGB as Major sensor: RGB -> IR/Depth/TOF

enumerator OB_SYNC_MODE_PRIMARY

Primary synchronize mode.

Primary device. Ignore process input trigger signal, only output trigger signal to secondary devices.

Inside single device, RGB as Major sensor: RGB -> IR/Depth/TOF

enumerator OB_SYNC_MODE_SECONDARY

Secondary synchronize mode.

Secondary device. Both process input trigger signal and output trigger signal to other devices.

Different sensors in a single devices receive trigger signals respectively:ext trigger -> RGB && ext trigger -> IR/Depth/TOF

Attention

With the current Gemini 2 device set to this mode, each Sensor receives the first external trigger signal after the stream is turned on and starts timing self-triggering at the set frame rate until the stream is turned off

enumerator OB_SYNC_MODE_PRIMARY_MCU_TRIGGER

MCU Primary synchronize mode.

Primary device. Ignore process input trigger signal, only output trigger signal to secondary devices.

Inside device, MCU is the primary signal source: MCU -> RGB && MCU -> IR/Depth/TOF

enumerator OB_SYNC_MODE_PRIMARY_IR_TRIGGER

IR Primary synchronize mode.

Primary device. Ignore process input trigger signal, only output trigger signal to secondary devices.

Inside device, IR is the primary signal source: IR/Depth/TOF -> RGB

enumerator OB_SYNC_MODE_PRIMARY_SOFT_TRIGGER

Software trigger synchronize mode.

Host, triggered by software control (receive the upper computer command trigger), at the same time to the trunk output trigger signal

Different sensors in a single machine receive trigger signals respectively: soft trigger -> RGB && soft trigger -> IR/Depth/TOF

Attention

Support product: Gemini2

enumerator OB_SYNC_MODE_SECONDARY_SOFT_TRIGGER

Software trigger synchronize mode as secondary device.

The slave receives the external trigger signal (the external trigger signal comes from the soft trigger host) and outputs the trigger signal to the external relay.

Different sensors in a single machine receive trigger signals respectively:ext trigger -> RGB && ext trigger -> IR/Depth/TOF

enumerator OB_SYNC_MODE_UNKNOWN

Unknown type.

enum OB_CMD_VERSION

Command version associated with property id.

Values:

enumerator OB_CMD_VERSION_V0

Version 1.0.

enumerator OB_CMD_VERSION_V1

Version 2.0.

enumerator OB_CMD_VERSION_V2

Version 3.0.

enumerator OB_CMD_VERSION_V3

Version 4.0.

enumerator OB_CMD_VERSION_NOVERSION
enumerator OB_CMD_VERSION_INVALID

Invalid version.

enum OBCommunicationType

Device communication mode.

Values:

enumerator OB_COMM_USB

USB.

enumerator OB_COMM_NET

Ethernet.

enum OBUSBPowerState

USB power status.

Values:

enumerator OB_USB_POWER_NO_PLUGIN

No plugin.

enumerator OB_USB_POWER_5V_0A9

5V/0.9A

enumerator OB_USB_POWER_5V_1A5

5V/1.5A

enumerator OB_USB_POWER_5V_3A0

5V/3.0A

enum OBDCPowerState

DC power status.

Values:

enumerator OB_DC_POWER_NO_PLUGIN

No plugin.

enumerator OB_DC_POWER_PLUGIN

Plugin.

enum ob_rotate_degree_type

Rotate degree.

Values:

enumerator OB_ROTATE_DEGREE_0

Rotate 0.

enumerator OB_ROTATE_DEGREE_90

Rotate 90.

enumerator OB_ROTATE_DEGREE_180

Rotate 180.

enumerator OB_ROTATE_DEGREE_270

Rotate 270.

enum ob_power_line_freq_mode

Power line frequency mode, for color camera anti-flicker configuration.

Values:

enumerator OB_POWER_LINE_FREQ_MODE_CLOSE

Close.

enumerator OB_POWER_LINE_FREQ_MODE_50HZ

50Hz

enumerator OB_POWER_LINE_FREQ_MODE_60HZ

60Hz

enum OB_FRAME_AGGREGATE_OUTPUT_MODE

Frame aggregate output mode.

Values:

enumerator OB_FRAME_AGGREGATE_OUTPUT_FULL_FRAME_REQUIRE

Only FrameSet that contains all types of data frames will be output.

enumerator OB_FRAME_AGGREGATE_OUTPUT_COLOR_FRAME_REQUIRE

Color Frame Require output mode.

Suitable for Color using H264, H265 and other inter-frame encoding format open stream

Attention

In this mode, the user may return null when getting a non-Color type data frame from the acquired FrameSet

enumerator OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION

FrameSet for any case will be output.

Attention

In this mode, the user may return null when getting the specified type of data frame from the acquired FrameSet

enum OB_COORDINATE_SYSTEM_TYPE

Enumeration of point cloud coordinate system types.

Values:

enumerator OB_LEFT_HAND_COORDINATE_SYSTEM
enumerator OB_RIGHT_HAND_COORDINATE_SYSTEM
enum OB_DEVICE_DEVELOPMENT_MODE

Enumeration of device development modes.

Values:

enumerator OB_USER_MODE

User mode (default mode), which provides full camera device functionality.

enumerator OB_DEVELOPER_MODE

Developer mode, which allows developers to access the operating system and software/hardware resources on the device directly.

enum ob_multi_device_sync_mode

The synchronization mode of the device.

Values:

enumerator OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN

free run mode

The device does not synchronize with other devices,

The Color and Depth can be set to different frame rates.

enumerator OB_MULTI_DEVICE_SYNC_MODE_STANDALONE

standalone mode

The device does not synchronize with other devices.

The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized.

enumerator OB_MULTI_DEVICE_SYNC_MODE_PRIMARY

primary mode

The device is the primary device in the multi-device system, it will output the trigger signal via VSYNC_OUT pin on synchronization port by default.

The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.

enumerator OB_MULTI_DEVICE_SYNC_MODE_SECONDARY

secondary mode

The device is the secondary device in the multi-device system, it will receive the trigger signal via VSYNC_IN pin on synchronization port. It will out the trigger signal via VSYNC_OUT pin on synchronization port by default.

The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.

After starting the stream, the device will wait for the trigger signal to start capturing images, and will stop capturing images when the trigger signal is stopped.

Attention

The frequency of the trigger signal should be same as the frame rate of the stream profile which is set when starting the stream.

enumerator OB_MULTI_DEVICE_SYNC_MODE_SECONDARY_SYNCED

secondary synced mode

The device is the secondary device in the multi-device system, it will receive the trigger signal via VSYNC_IN pin on synchronization port. It will out the trigger signal via VSYNC_OUT pin on synchronization port by default.

The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.

After starting the stream, the device will be immediately start capturing images, and will adjust the capture time when the trigger signal is received to synchronize with the primary device. If the trigger signal is stopped, the device will still capture images.

Attention

The frequency of the trigger signal should be same as the frame rate of the stream profile which is set when starting the stream.

enumerator OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING

software triggering mode

The device will start one time image capture after receiving the capture command and will output the trigger signal via VSYNC_OUT pin by default. The capture command can be sent form host by call ob_device_trigger_capture. The number of images captured each time can be set by framesPerTrigger.

The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.

The frequency of the user call ob_device_trigger_capture to send the capture command multiplied by the number of frames per trigger should be less than the frame rate of the stream profile which is set when starting the stream.

enumerator OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING

hardware triggering mode

The device will start one time image capture after receiving the trigger signal via VSYNC_IN pin on synchronization port and will output the trigger signal via VSYNC_OUT pin by default. The number of images captured each time can be set by framesPerTrigger.

The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.

Attention

The frequency of the trigger signal multiplied by the number of frames per trigger should be less than the frame rate of the stream profile which is set when starting the stream.

Attention

The trigger signal input via VSYNC_IN pin on synchronization port should be ouput by other device via VSYNC_OUT pin in hardware triggering mode or software triggering mode.

Attention

Due to different models may have different signal input requirements, please do not use different models to output trigger signal as input-trigger signal.

enum OBPropertyID

Enumeration value describing all attribute control commands of the device.

Values:

enumerator OB_PROP_LDP_BOOL

LDP switch.

enumerator OB_PROP_LASER_BOOL

Laser switch.

enumerator OB_PROP_LASER_PULSE_WIDTH_INT

laser pulse width

enumerator OB_PROP_LASER_CURRENT_FLOAT

Laser current (uint: mA)

enumerator OB_PROP_FLOOD_BOOL

IR flood switch.

enumerator OB_PROP_FLOOD_LEVEL_INT

IR flood level.

enumerator OB_PROP_DEPTH_MIRROR_BOOL

Depth mirror.

enumerator OB_PROP_DEPTH_FLIP_BOOL

Depth flip.

enumerator OB_PROP_DEPTH_POSTFILTER_BOOL

Depth Postfilter.

enumerator OB_PROP_DEPTH_HOLEFILTER_BOOL

Depth Holefilter.

enumerator OB_PROP_IR_MIRROR_BOOL

IR mirror.

enumerator OB_PROP_IR_FLIP_BOOL

IR flip.

enumerator OB_PROP_MIN_DEPTH_INT

Minimum depth threshold.

enumerator OB_PROP_MAX_DEPTH_INT

Maximum depth threshold.

enumerator OB_PROP_DEPTH_SOFT_FILTER_BOOL

Software filter switch.

enumerator OB_PROP_LDP_STATUS_BOOL

LDP status.

enumerator OB_PROP_DEPTH_MAX_DIFF_INT

soft filter maxdiff param

enumerator OB_PROP_DEPTH_MAX_SPECKLE_SIZE_INT

soft filter maxSpeckleSize

enumerator OB_PROP_DEPTH_ALIGN_HARDWARE_BOOL

Hardware d2c is on.

enumerator OB_PROP_TIMESTAMP_OFFSET_INT

Timestamp adjustment.

enumerator OB_PROP_HARDWARE_DISTORTION_SWITCH_BOOL

Hardware distortion switch Rectify.

enumerator OB_PROP_FAN_WORK_MODE_INT

Fan mode switch.

enumerator OB_PROP_DEPTH_ALIGN_HARDWARE_MODE_INT

Multi-resolution D2C mode.

enumerator OB_PROP_ANTI_COLLUSION_ACTIVATION_STATUS_BOOL

Anti_collusion activation status.

enumerator OB_PROP_DEPTH_PRECISION_LEVEL_INT

the depth precision level, which may change the depth frame data unit, needs to be confirmed through the ValueScale interface of DepthFrame

enumerator OB_PROP_TOF_FILTER_RANGE_INT

tof filter range configuration

enumerator OB_PROP_LASER_MODE_INT

laser mode, the firmware terminal currently only return 1: IR Drive, 2: Torch

enumerator OB_PROP_RECTIFY2_BOOL

brt2r-rectify function switch (brt2r is a special module on mx6600), 0: Disable, 1: Rectify Enable

enumerator OB_PROP_COLOR_MIRROR_BOOL

Color mirror.

enumerator OB_PROP_COLOR_FLIP_BOOL

Color flip.

enumerator OB_PROP_INDICATOR_LIGHT_BOOL

Indicator switch, 0: Disable, 1: Enable.

enumerator OB_PROP_DISPARITY_TO_DEPTH_BOOL

Disparity to depth switch, 0: off, the depth stream outputs the disparity map; 1. On, the depth stream outputs the depth map.

enumerator OB_PROP_BRT_BOOL

BRT function switch (anti-background interference), 0: Disable, 1: Enable.

enumerator OB_PROP_WATCHDOG_BOOL

Watchdog function switch, 0: Disable, 1: Enable.

enumerator OB_PROP_EXTERNAL_SIGNAL_RESET_BOOL

External signal trigger restart function switch, 0: Disable, 1: Enable.

enumerator OB_PROP_HEARTBEAT_BOOL

Heartbeat monitoring function switch, 0: Disable, 1: Enable.

enumerator OB_PROP_DEPTH_CROPPING_MODE_INT

Depth cropping mode device: OB_DEPTH_CROPPING_MODE.

enumerator OB_PROP_D2C_PREPROCESS_BOOL

D2C preprocessing switch (such as RGB cropping), 0: off, 1: on.

enumerator OB_PROP_RGB_CUSTOM_CROP_BOOL

Custom RGB cropping switch, 0 is off, 1 is on custom cropping, and the ROI cropping area is issued.

enumerator OB_PROP_DEVICE_WORK_MODE_INT

Device operating mode (power consumption)

enumerator OB_PROP_DEVICE_COMMUNICATION_TYPE_INT

Device communication type, 0: USB; 1: Ethernet(RTSP)

enumerator OB_PROP_SWITCH_IR_MODE_INT

Switch infrared imaging mode, 0: active IR mode, 1: passive IR mode.

enumerator OB_PROP_LASER_ENERGY_LEVEL_INT

Laser energy level.

enumerator OB_PROP_LDP_MEASURE_DISTANCE_INT

LDP’s measure distance, unit: mm.

enumerator OB_PROP_TIMER_RESET_SIGNAL_BOOL

Reset device time to zero.

enumerator OB_PROP_TIMER_RESET_TRIGGER_OUT_ENABLE_BOOL

Enable send reset device time signal to other device. true: enable, false: disable.

enumerator OB_PROP_TIMER_RESET_DELAY_US_INT

Delay to reset device time, unit: us.

enumerator OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL

Signal to capture image.

enumerator OB_PROP_IR_RIGHT_MIRROR_BOOL

Right IR sensor mirror state.

enumerator OB_PROP_CAPTURE_IMAGE_FRAME_NUMBER_INT

Number frame to capture once a ‘OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL’ effect. range: [1, 255].

enumerator OB_PROP_IR_RIGHT_FLIP_BOOL

Right IR sensor flip state. true: flip image, false: origin, default: false.

enumerator OB_PROP_COLOR_ROTATE_INT

Color sensor rotation, angle{0, 90, 180, 270}.

enumerator OB_PROP_IR_ROTATE_INT

IR/Left-IR sensor rotation, angle{0, 90, 180, 270}.

enumerator OB_PROP_IR_RIGHT_ROTATE_INT

Right IR sensor rotation, angle{0, 90, 180, 270}.

enumerator OB_PROP_DEPTH_ROTATE_INT

Depth sensor rotation, angle{0, 90, 180, 270}.

enumerator OB_PROP_LASER_HW_ENERGY_LEVEL_INT

Get hardware laser energy level which real state of laser element. OB_PROP_LASER_ENERGY_LEVEL_INT(99)will effect this command which it setting and changed the hardware laser energy level.

enumerator OB_PROP_USB_POWER_STATE_INT

USB’s power state, enum type: OBUSBPowerState.

enumerator OB_PROP_DC_POWER_STATE_INT

DC’s power state, enum type: OBDCPowerState.

enumerator OB_PROP_DEVICE_DEVELOPMENT_MODE_INT

Device development mode switch, optional modes can refer to the definition in OBDeviceDevelopmentMode,the default mode is OB_USER_MODE.

Attention

The device takes effect after rebooting when switching modes.

enumerator OB_PROP_SYNC_SIGNAL_TRIGGER_OUT_BOOL

Multi-DeviceSync synchronized signal trigger out is enable state. true: enable, false: disable.

enumerator OB_PROP_RESTORE_FACTORY_SETTINGS_BOOL

Restore factory settings and factory parameters.

Attention

This command can only be written, and the parameter value must be true. The command takes effect after restarting the device.

enumerator OB_PROP_BOOT_INTO_RECOVERY_MODE_BOOL

Enter recovery mode (flashing mode) when boot the device.

Attention

The device will take effect after rebooting with the enable option. After entering recovery mode, you can upgrade the device system. Upgrading the system may cause system damage, please use it with caution.

enumerator OB_PROP_DEVICE_IN_RECOVERY_MODE_BOOL

Query whether the current device is running in recovery mode (read-only)

enumerator OB_PROP_CAPTURE_INTERVAL_MODE_INT

Capture interval mode, 0:time interval, 1:number interval.

enumerator OB_PROP_CAPTURE_IMAGE_TIME_INTERVAL_INT

Capture time interval.

enumerator OB_PROP_CAPTURE_IMAGE_NUMBER_INTERVAL_INT

Capture number interval.

enumerator OB_PROP_TIMER_RESET_ENABLE_BOOL
enumerator OB_PROP_DEVICE_USB3_REPEAT_IDENTIFY_BOOL

Enable switch for USB3.0 repeated recognition on the device.

enumerator OB_PROP_DEVICE_REBOOT_DELAY_INT

Reboot device delay mode. Delay time unit: ms, range: [0, 8000).

enumerator OB_PROP_LASER_OVERCURRENT_PROTECTION_STATUS_BOOL

Query the status of laser overcurrent protection (read-only)

enumerator OB_PROP_LASER_PULSE_WIDTH_PROTECTION_STATUS_BOOL

Query the status of laser pulse width protection (read-only)

enumerator OB_STRUCT_BASELINE_CALIBRATION_PARAM

Baseline calibration parameters.

enumerator OB_STRUCT_DEVICE_TEMPERATURE

Device temperature information.

enumerator OB_STRUCT_TOF_EXPOSURE_THRESHOLD_CONTROL

TOF exposure threshold range.

enumerator OB_STRUCT_DEVICE_SERIAL_NUMBER

get/set serial number

enumerator OB_STRUCT_DEVICE_TIME

get/set device time

enumerator OB_STRUCT_MULTI_DEVICE_SYNC_CONFIG

Multi-device synchronization mode and parameter configuration.

enumerator OB_STRUCT_RGB_CROP_ROI

RGB cropping ROI.

enumerator OB_STRUCT_DEVICE_IP_ADDR_CONFIG

Device IP address configuration.

enumerator OB_STRUCT_CURRENT_DEPTH_ALG_MODE

The current camera depth mode.

enumerator OB_STRUCT_DEPTH_PRECISION_SUPPORT_LIST

A list of depth accuracy levels, returning an array of uin16_t, corresponding to the enumeration.

enumerator OB_STRUCT_DEVICE_STATIC_IP_CONFIG_RECORD

Device network static ip config record.

Using for get last static ip config,witch is record in device flash when user set static ip config

Attention

read only

enumerator OB_PROP_COLOR_AUTO_EXPOSURE_BOOL

Color camera auto exposure.

enumerator OB_PROP_COLOR_EXPOSURE_INT

Color camera exposure adjustment.

enumerator OB_PROP_COLOR_GAIN_INT

Color camera gain adjustment.

enumerator OB_PROP_COLOR_AUTO_WHITE_BALANCE_BOOL

Color camera automatic white balance.

enumerator OB_PROP_COLOR_WHITE_BALANCE_INT

Color camera white balance adjustment.

enumerator OB_PROP_COLOR_BRIGHTNESS_INT

Color camera brightness adjustment.

enumerator OB_PROP_COLOR_SHARPNESS_INT

Color camera sharpness adjustment.

enumerator OB_PROP_COLOR_SHUTTER_INT

Color camera shutter adjustment.

enumerator OB_PROP_COLOR_SATURATION_INT

Color camera saturation adjustment.

enumerator OB_PROP_COLOR_CONTRAST_INT

Color camera contrast adjustment.

enumerator OB_PROP_COLOR_GAMMA_INT

Color camera gamma adjustment.

enumerator OB_PROP_COLOR_ROLL_INT

Color camera image rotation.

enumerator OB_PROP_COLOR_AUTO_EXPOSURE_PRIORITY_INT

Color camera auto exposure priority.

enumerator OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT

Color camera brightness compensation.

enumerator OB_PROP_COLOR_HUE_INT

Color camera color tint.

enumerator OB_PROP_COLOR_POWER_LINE_FREQUENCY_INT

Color Camera Power Line Frequency.

enumerator OB_PROP_DEPTH_AUTO_EXPOSURE_BOOL

Automatic exposure of depth camera (infrared camera will be set synchronously under some models of devices)

enumerator OB_PROP_DEPTH_EXPOSURE_INT

Depth camera exposure adjustment (infrared cameras will be set synchronously under some models of devices)

enumerator OB_PROP_DEPTH_GAIN_INT

Depth camera gain adjustment (infrared cameras will be set synchronously under some models of devices)

enumerator OB_PROP_IR_AUTO_EXPOSURE_BOOL

Infrared camera auto exposure (depth camera will be set synchronously under some models of devices)

enumerator OB_PROP_IR_EXPOSURE_INT

Infrared camera exposure adjustment (some models of devices will set the depth camera synchronously)

enumerator OB_PROP_IR_GAIN_INT

Infrared camera gain adjustment (the depth camera will be set synchronously under some models of devices)

enumerator OB_PROP_IR_CHANNEL_DATA_SOURCE_INT

Select Infrared camera data source channel. If not support throw exception. 0 : IR stream from IR Left sensor; 1 : IR stream from IR Right sensor;.

enumerator OB_PROP_DEPTH_RM_FILTER_BOOL

Depth effect dedistortion, true: on, false: off. mutually exclusive with D2C function, RM_Filter disable When hardware or software D2C is enabled.

enumerator OB_PROP_COLOR_MAXIMAL_GAIN_INT

Color camera maximal gain.

enumerator OB_PROP_COLOR_MAXIMAL_SHUTTER_INT

Color camera shutter gain.

enumerator OB_PROP_IR_SHORT_EXPOSURE_BOOL

The enable/disable switch for IR short exposure function, supported only by a few devices.

enumerator OB_PROP_SDK_DISPARITY_TO_DEPTH_BOOL

Software disparity to depth.

enumerator OB_PROP_SDK_DEPTH_FRAME_UNPACK_BOOL

Depth data unpacking function switch (each open stream will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)

enumerator OB_PROP_SDK_IR_FRAME_UNPACK_BOOL

IR data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)

enumerator OB_PROP_SDK_ACCEL_FRAME_TRANSFORMED_BOOL

Accel data conversion function switch (on by default)

enumerator OB_PROP_SDK_GYRO_FRAME_TRANSFORMED_BOOL

Gyro data conversion function switch (on by default)

enumerator OB_PROP_SDK_IR_LEFT_FRAME_UNPACK_BOOL

Left IR frame data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)

enumerator OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL

Right IR frame data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)

enumerator OB_RAW_DATA_CAMERA_CALIB_JSON_FILE

Calibration JSON file read from device (Femto Mega, read only)

enum OBPropertyType

The data type used to describe all property settings.

Values:

enumerator OB_BOOL_PROPERTY

Boolean property

enumerator OB_INT_PROPERTY

Integer property

enumerator OB_FLOAT_PROPERTY

Floating-point property

enumerator OB_STRUCT_PROPERTY

Struct property

类型定义

typedef struct ContextImpl ob_context
typedef struct DeviceImpl ob_device
typedef struct DeviceInfoImpl ob_device_info
typedef struct DeviceListImpl ob_device_list
typedef struct CameraParamListImpl ob_camera_param_list
typedef struct SensorImpl ob_sensor
typedef struct SensorListImpl ob_sensor_list
typedef struct StreamProfileImpl ob_stream_profile
typedef struct StreamProfileListImpl ob_stream_profile_list
typedef struct CFrameImpl ob_frame
typedef struct FilterImpl ob_filter
typedef struct PipelineImpl ob_pipeline
typedef struct ConfigImpl ob_config
typedef struct RecorderImpl ob_recorder
typedef struct PlaybackImpl ob_playback
typedef struct OBDepthWorkModeListImpl ob_depth_work_mode_list
typedef enum OBHPStatusCode ob_hp_status_code
typedef enum OBPermissionType ob_permission_type
typedef enum OBStatus ob_status
typedef enum OBLogSeverity ob_log_severity
typedef enum OBLogSeverity DEVICE_LOG_SEVERITY_LEVEL
typedef enum OBLogSeverity OBDeviceLogSeverityLevel
typedef enum OBLogSeverity ob_device_log_severity_level
typedef enum OBExceptionType ob_exception_type
typedef struct ob_error ob_error

The error class exposed by the SDK, users can get detailed error information according to the error.

typedef enum OBSensorType ob_sensor_type
typedef enum OBStreamType ob_stream_type
typedef enum OBFrameType ob_frame_type
typedef enum OBFormat ob_format
typedef enum OBUpgradeState ob_upgrade_state
typedef enum OBFileTranState ob_file_tran_state
typedef enum OBDataTranState ob_data_tran_state
typedef struct OBDataChunk ob_data_chunk
typedef struct OBIntPropertyRange ob_int_property_range
typedef struct OBFloatPropertyRange ob_float_property_range
typedef struct OBBoolPropertyRange ob_bool_property_range
typedef struct OBCameraIntrinsic ob_camera_intrinsic
typedef struct OBCameraDistortion ob_camera_distortion
typedef struct OBD2CTransform ob_d2c_transform
typedef struct OBCameraParam ob_camera_param
typedef struct OBCameraParam_V0 ob_camera_param_v0
typedef struct ob_margin_filter_config OBMarginFilterConfig
typedef enum OBAlignMode ob_align_mode
typedef struct OBRect ob_rect
typedef enum OBConvertFormat ob_convert_format
typedef enum OBGyroSampleRate ob_gyro_sample_rate
typedef enum OBGyroSampleRate OBAccelSampleRate
typedef enum OBGyroSampleRate ob_accel_sample_rate
typedef enum OBGyroSampleRate OB_SAMPLE_RATE
typedef enum OBGyroFullScaleRange ob_gyro_full_scale_range
typedef enum OBGyroFullScaleRange OB_GYRO_FULL_SCALE_RANGE
typedef enum OBAccelFullScaleRange ob_accel_full_scale_range
typedef enum OBAccelFullScaleRange OB_ACCEL_FULL_SCALE_RANGE
typedef struct OBAccelValue OBGyroValue
typedef struct OBAccelValue ob_accel_value
typedef struct OBAccelValue ob_gyro_value
typedef uint64_t OBDeviceState

Device state.

typedef uint64_t ob_device_state
typedef struct OBDeviceTemperature ob_device_temperature
typedef struct OBDeviceTemperature DEVICE_TEMPERATURE
typedef enum OBDepthCroppingMode ob_depth_cropping_mode
typedef enum OBDepthCroppingMode OB_DEPTH_CROPPING_MODE
typedef enum OBDeviceType ob_device_type
typedef enum OBDeviceType OB_DEVICE_TYPE
typedef enum OBMediaType ob_media_type
typedef enum OBMediaType OB_MEDIA_TYPE
typedef enum OBMediaState ob_media_state
typedef enum OBMediaState OB_MEDIA_STATE_EM
typedef enum OBDepthPrecisionLevel ob_depth_precision_level
typedef enum OBDepthPrecisionLevel OB_DEPTH_PRECISION_LEVEL
typedef enum OBTofFilterRange ob_tof_filter_range
typedef enum OBTofFilterRange TOF_FILTER_RANGE
typedef struct OBPoint ob_point
typedef struct OBColorPoint ob_color_point
typedef enum OBCompressionMode ob_compression_mode
typedef enum OBCompressionMode OB_COMPRESSION_MODE
typedef struct OBCompressionParams ob_compression_params
typedef struct OBCompressionParams OB_COMPRESSION_PARAMS
typedef struct OBTofExposureThresholdControl ob_tof_exposure_threshold_control
typedef struct OBTofExposureThresholdControl TOF_EXPOSURE_THRESHOLD_CONTROL
typedef enum OBSyncMode ob_sync_mode
typedef enum OBSyncMode OB_SYNC_MODE
typedef struct OBDeviceSyncConfig ob_device_sync_config
typedef struct OBDeviceSyncConfig OB_DEVICE_SYNC_CONFIG
typedef struct OBDepthWorkMode ob_depth_work_mode
typedef struct OBProtocolVersion ob_protocol_version
typedef enum OB_CMD_VERSION OBCmdVersion
typedef enum OB_CMD_VERSION ob_cmd_version
typedef struct OBDataBundle OBDataBundle

Internal API for future publication.

C language: data’s type is a uint8_t pointer, and the user parses data to the destination type. itemTypeSize == 1, dataSize == itemCount;

C++: data’s type is the propertyId and OBCmdVersion’s data type. itemTypeSize = sizeof(T), itemCount = dataSize / itemTypeSize;

Note

This data type matches OBCmdVersion of one propertyId. PropertyId has multiple OBCmdVersion, and different OBCmdVersion of this propertyId has different data types. PropertyId and OBCmdVersion match only one data type. itemCount is the number of data types contained in data bytes. C language and C++ have differences.

typedef struct OBDataBundle ob_data_bundle
typedef struct OBNetIpConfig ob_net_ip_config
typedef struct OBNetIpConfig DEVICE_IP_ADDR_CONFIG
typedef enum OBCommunicationType ob_communication_type
typedef enum OBCommunicationType OB_COMMUNICATION_TYPE
typedef enum OBUSBPowerState ob_usb_power_state
typedef enum OBDCPowerState ob_dc_power_state
typedef enum ob_rotate_degree_type OBRotateDegreeType
typedef enum ob_power_line_freq_mode OBPowerLineFreqMode
typedef enum OB_FRAME_AGGREGATE_OUTPUT_MODE OBFrameAggregateOutputMode
typedef enum OB_FRAME_AGGREGATE_OUTPUT_MODE ob_frame_aggregate_output_mode
typedef enum OB_COORDINATE_SYSTEM_TYPE OBCoordinateSystemType
typedef enum OB_COORDINATE_SYSTEM_TYPE ob_coordinate_system_type
typedef enum OB_DEVICE_DEVELOPMENT_MODE OBDeviceDevelopmentMode
typedef enum OB_DEVICE_DEVELOPMENT_MODE ob_device_development_mode
typedef enum ob_multi_device_sync_mode OBMultiDeviceSyncMode
typedef struct ob_multi_device_sync_config OBMultiDeviceSyncConfig
typedef struct ob_device_timestamp_reset_config OBDeviceTimestampResetConfig
typedef void (*ob_file_send_callback)(ob_file_tran_state state, const char *message, uint8_t percent, void *user_data)

Callback for file transfer.

Param state

Transmission status

Param message

Transfer status information

Param percent

Transfer progress percentage

Param user_data

User-defined data

typedef void (*ob_device_upgrade_callback)(ob_upgrade_state state, const char *message, uint8_t percent, void *user_data)

Callback for firmware upgrade.

Param state

Upgrade status

Param message

Upgrade status information

Param percent

Upgrade progress percentage

Param user_data

User-defined data

typedef void (*ob_device_state_callback)(ob_device_state state, const char *message, void *user_data)

Callback for device status.

Param state

Device status

Param message

Device status information

Param user_data

User-defined data

typedef void (*ob_set_data_callback)(ob_data_tran_state state, uint8_t percent, void *user_data)

Callback for writing data.

Param state

Write data status

Param percent

Write data percentage

Param user_data

User-defined data

typedef void (*ob_get_data_callback)(ob_data_tran_state state, ob_data_chunk *dataChunk, void *user_data)

Callback for reading data.

Param state

Read data status

Param dataChunk

Read the returned data block

Param user_data

User-defined data

typedef void (*ob_media_state_callback)(ob_media_state state, void *user_data)

Callback for media status (recording and playback)

Param state

Condition

Param user_data

User-defined data

typedef void (*ob_device_changed_callback)(ob_device_list *removed, ob_device_list *added, void *user_data)

Callback for device change.

Param removed

List of deleted (dropped) devices

Param added

List of added (online) devices

Param user_data

User-defined data

typedef void (*ob_frame_callback)(ob_frame *frame, void *user_data)

Callback for frame.

Param frame

Frame object

Param user_data

User-defined data

typedef void (*ob_frameset_callback)(ob_frame *frameset, void *user_data)

Callback for frameset.

Param frameset

Frameset object

Param user_data

User-defined data

void() ob_frame_destroy_callback (void *buffer, void *user_data)

Customize the delete callback.

Param buffer

Data that needs to be deleted

Param user_data

User-defined data

void() ob_log_callback (ob_log_severity severity, const char *message, void *user_data)

Callback for receiving log.

Param severity

Current log level

Param message

Log message

Param user_data

User-defined data

void() ob_get_imu_data_callback (const uint8_t *data, uint32_t dataLen)
typedef enum OBPropertyID ob_property_id
typedef enum OBPropertyType OBPropertyType

The data type used to describe all property settings.

typedef enum OBPropertyType ob_property_type
typedef struct OBPropertyItem OBPropertyItem

Used to describe the characteristics of each property.

typedef struct OBPropertyItem ob_property_item

函数

ob_context *ob_create_context(ob_error **error)

Create a context object.

Parameters

error[out] Pointer to an error object that will be populated if an error occurs during context creation

Returns

Pointer to the created context object

ob_context *ob_create_context_with_config(const char *config_path, ob_error **error)

Create a context object with a specified configuration file.

Parameters
  • config_path[in] Path to the configuration file. If NULL, the default configuration file will be used.

  • error[out] Pointer to an error object that will be populated if an error occurs during context creation

Returns

Pointer to the created context object

void ob_delete_context(ob_context *context, ob_error **error)

Delete a context object.

Parameters
  • context[in] Pointer to the context object to be deleted

  • error[out] Pointer to an error object that will be populated if an error occurs during context deletion

ob_device_list *ob_query_device_list(ob_context *context, ob_error **error)

Get a list of enumerated devices.

Parameters
  • context[in] Pointer to the context object

  • error[out] Pointer to an error object that will be populated if an error occurs during device enumeration

Returns

Pointer to the device list object

void ob_enable_net_device_enumeration(ob_context *context, bool enable, ob_error **error)

Enable or disable network device enumeration.

After enabling, the network device will be automatically discovered and can be retrieved through ob_query_device_list. The default state can be set in the configuration file.

Attention

Network device enumeration is performed through the GVCP protocol. If the device is not in the same subnet as the host, it will be discovered but cannot be connected.

Parameters
  • context[in] Pointer to the context object

  • enable[in] true to enable, false to disable

  • error[out] Pointer to an error object that will be populated if an error occurs.

ob_device *ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error)

Create a network device object.

Parameters
  • context[in] Pointer to the context object

  • address[in] IP address of the device

  • port[in] Port number of the device

  • error[out] Pointer to an error object that will be populated if an error occurs during device creation

Returns

Pointer to the created device object

void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error)

Set a device plug-in callback function.

Attention

The added and removed device lists returned through the callback interface need to be released manually

Parameters
  • context[in] Pointer to the context object

  • callback[in] Pointer to the callback function triggered when a device is plugged or unplugged

  • user_data[in] Pointer to user data that can be passed to and retrieved from the callback function

  • error[out] Pointer to an error object that will be populated if an error occurs during callback function setting

void ob_enable_device_clock_sync(ob_context *context, uint64_t repeatInterval, ob_error **error)

Activates device clock synchronization to synchronize the clock of the host and all created devices (if supported).

Parameters
  • context[in] Pointer to the context object

  • repeatInterval[in] The interval for auto-repeated synchronization, in milliseconds. If the value is 0, synchronization is performed only once.

  • error[out] Pointer to an error object that will be populated if an error occurs during execution

void ob_free_idle_memory(ob_context *context, ob_error **error)

Free idle memory from the internal frame memory pool.

Parameters
  • context[in] Pointer to the context object

  • error[out] Pointer to an error object that will be populated if an error occurs during memory freeing

void ob_set_logger_severity(ob_log_severity severity, ob_error **error)

Set the global log level.

Attention

This interface setting will affect the output level of all logs (terminal, file, callback)

Parameters
  • severity[in] Log level to set

  • error[out] Pointer to an error object that will be populated if an error occurs during log level setting

void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error)

Set the log output to a file.

Parameters
  • severity[in] Log level to output to file

  • directory[in] Path to the log file output directory. If the path is empty, the existing settings will continue to be used (if the existing configuration is also empty, the log will not be output to the file)

  • error[out] Pointer to an error object that will be populated if an error occurs during log output setting

void ob_set_logger_callback(ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error)

Set the log callback function.

Parameters
  • severity[in] Log level to set for the callback function

  • callback[in] Pointer to the callback function

  • user_data[in] Pointer to user data that can be passed to and retrieved from the callback function

  • error[out] Pointer to an error object that will be populated if an error occurs during log callback function setting

void ob_set_logger_to_console(ob_log_severity severity, ob_error **error)

Set the log output to the console.

Parameters
  • severity[in] Log level to output to the console

  • error[out] Pointer to an error object that will be populated if an error occurs during log output setting

void ob_load_license(const char *filePath, const char *key, ob_error **error)

Load a license file.

Parameters
  • filePath[in] Path to the license file

  • key[in] Decryption key. “OB_DEFAULT_DECRYPT_KEY” can be used to represent the default key.

  • error[out] Pointer to an error object that will be populated if an error occurs during license loading

void ob_load_license_from_data(const char *data, uint32_t dataLen, const char *key, ob_error **error)

Load a license from data.

Parameters
  • data[in] Pointer to the license data

  • dataLen[in] Length of the license data

  • key[in] Decryption key. “OB_DEFAULT_DECRYPT_KEY” can be used to represent the default key.

  • error[out] Pointer to an error object that will be populated if an error occurs during license loading

uint32_t ob_device_list_device_count(ob_device_list *list, ob_error **error)

Get the number of devices.

Parameters
  • list[in] Device list object

  • error[out] Log error messages

Returns

uint32_t return the number of devices

const char *ob_device_list_get_device_name(ob_device_list *list, uint32_t index, ob_error **error)

Get device name (DEPRECATED)

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

const char* return device name

int ob_device_list_get_device_pid(ob_device_list *list, uint32_t index, ob_error **error)

Get the pid of the specified device.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

int return the device pid

int ob_device_list_get_device_vid(ob_device_list *list, uint32_t index, ob_error **error)

Get the vid of the specified device.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

int return device vid

const char *ob_device_list_get_device_uid(ob_device_list *list, uint32_t index, ob_error **error)

Get the uid of the specified device.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

const char* return the device uid

const char *ob_device_list_get_device_serial_number(ob_device_list *list, uint32_t index, ob_error **error)

Get the serial number of the specified device.

Parameters
  • list[in] Device list object.

  • index[in] Device index.

  • error[out] Log error messages.

Returns

const char* The device UID.

const char *ob_device_list_get_device_connection_type(ob_device_list *list, uint32_t index, ob_error **error)

Get device connection type.

Parameters
  • list[in] Device list object

  • index[in] Device index

  • error[out] Log error messages

Returns

const char* returns the device connection type,currently supports:”USB”, “USB1.0”, “USB1.1”, “USB2.0”, “USB2.1”, “USB3.0”, “USB3.1”, “USB3.2”, “Ethernet”

const char *ob_device_list_get_device_ip_address(ob_device_list *list, uint32_t index, ob_error **error)

Get device ip address.

Attention

Only valid for network devices, otherwise it will return “0.0.0.0”.

Parameters
  • list – Device list object

  • index – Device index

  • error – Log error messages

Returns

const char* returns the device ip address,such as “192.168.1.10”

ob_device *ob_device_list_get_device(ob_device_list *list, uint32_t index, ob_error **error)

Create a device.

Attention

If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.

Parameters
  • list[in] Device list object.

  • index[in] The index of the device to create.

  • error[out] Log error messages.

Returns

ob_device* The created device.

ob_device *ob_device_list_get_device_by_serial_number(ob_device_list *list, const char *serial_number, ob_error **error)

Create a device.

Attention

If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.

Parameters
  • list[in] Device list object.

  • serial_number[in] The serial number of the device to create.

  • error[out] Log error messages.

Returns

ob_device* The created device.

ob_device *ob_device_list_get_device_by_uid(ob_device_list *list, const char *uid, ob_error **error)

Create device by uid.

On Linux platform, the uid of the device is composed of bus-port-dev, for example 1-1.2-1. But the SDK will remove the dev number and only keep the bus-port as the uid to create the device, for example 1-1.2, so that we can create a device connected to the specified USB port. Similarly, users can also directly pass in bus-port as uid to create device.

Attention

If the device has already been acquired and created elsewhere, repeated acquisitions will return an error.

Parameters
  • list[in] Device list object.

  • uid[in] The UID of the device to create.

  • error[out] Log error messages.

Returns

ob_device* The created device.

void ob_delete_device(ob_device *device, ob_error **error)

Delete a device.

Parameters
  • device[in] The device to be deleted.

  • error[out] Log error messages.

void ob_delete_device_info(ob_device_info *info, ob_error **error)

Delete device information.

Parameters
  • info[in] The device information to be deleted.

  • error[out] Log error messages.

void ob_delete_device_list(ob_device_list *list, ob_error **error)

Delete a device list.

Parameters
  • list[in] The device list object to be deleted.

  • error[out] Log error messages.

ob_device_info *ob_device_get_device_info(ob_device *device, ob_error **error)

Get device information.

Parameters
  • device[in] The device to obtain information from.

  • error[out] Log error messages.

Returns

ob_device_info* The device information.

ob_sensor_list *ob_device_get_sensor_list(ob_device *device, ob_error **error)

List all sensors.

Parameters
  • device[in] The device object.

  • error[out] Log error messages.

Returns

ob_sensor_list* The list of all sensors.

ob_sensor *ob_device_get_sensor(ob_device *device, ob_sensor_type type, ob_error **error)

Get a device’s sensor.

Parameters
  • device[in] The device object.

  • type[in] The type of sensor to get.

  • error[out] Log error messages.

Returns

ob_sensor* The acquired sensor.

void ob_device_set_int_property(ob_device *device, ob_property_id property_id, int32_t property, ob_error **error)

Set an integer type of device property.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property to be set.

  • property[in] The property value to be set.

  • error[out] Log error messages.

int32_t ob_device_get_int_property(ob_device *device, ob_property_id property_id, ob_error **error)

Get an integer type of device property.

Parameters
  • device[in] The device object.

  • property_id[in] The property ID.

  • error[out] Log error messages.

Returns

int32_t The property value.

void ob_device_set_float_property(ob_device *device, ob_property_id property_id, float property, ob_error **error)

Set a float type of device property.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property to be set.

  • property[in] The property value to be set.

  • error[out] Log error messages.

float ob_device_get_float_property(ob_device *device, ob_property_id property_id, ob_error **error)

Get a float type of device property.

Parameters
  • device[in] The device object.

  • property_id[in] The property ID.

  • error[out] Log error messages.

Returns

float The property value.

void ob_device_set_bool_property(ob_device *device, ob_property_id property_id, bool property, ob_error **error)

Set a boolean type of device property.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property to be set.

  • property[in] The property value to be set.

  • error[out] Log error messages.

bool ob_device_get_bool_property(ob_device *device, ob_property_id property_id, ob_error **error)

Get a boolean type of device property.

Parameters
  • device[in] The device object.

  • property_id[in] The property ID.

  • error[out] Log error messages.

Returns

bool The property value.

void ob_device_set_structured_data(ob_device *device, ob_property_id property_id, const void *data, uint32_t data_size, ob_error **error)

Set structured data.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property to be set.

  • data[in] The property data to be set.

  • data_size[in] The size of the property to be set.

  • error[out] Log error messages.

void ob_device_get_structured_data(ob_device *device, ob_property_id property_id, void *data, uint32_t *data_size, ob_error **error)

Get structured data of a device property.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property.

  • data[out] The obtained property data.

  • data_size[out] The size of the obtained property data.

  • error[out] Log error messages.

void ob_device_set_structured_data_ext(ob_device *device, ob_property_id property_id, ob_data_bundle *data_bundle, ob_set_data_callback cb, void *user_data, ob_error **error)

Set structured data of a device property.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property.

  • data_bundle[in] The target data to set.

  • cb[in] The data callback.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

ob_data_bundle *ob_device_get_structured_data_ext(ob_device *device, ob_property_id property_id, ob_error **error)

Get structured data of a device property.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property.

  • error[out] Log error messages.

Returns

ob_data_bundle. NOTE: ob_data_bundle must be freed by ob_delete_data_bundle() because it comes from OrbbecSDK’s API.

void ob_device_set_raw_data(ob_device *device, ob_property_id property_id, void *data, uint32_t data_size, ob_set_data_callback cb, bool async, void *user_data, ob_error **error)

Set raw data of a device property.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property to be set.

  • data[in] The property data to be set.

  • data_size[in] The size of the property data to be set.

  • cb[in] The set data callback.

  • async[in] Whether to execute asynchronously.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

void ob_device_get_raw_data(ob_device *device, ob_property_id property_id, ob_get_data_callback cb, bool async, void *user_data, ob_error **error)

Get raw data of a device property.

Parameters
  • device[in] The device object.

  • property_id[in] The ID of the property.

  • cb[in] The get data callback.

  • async[in] Whether to execute asynchronously.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

ob_protocol_version ob_device_get_protocol_version(ob_device *device, ob_error **error)

Get the protocol version of the device.

Parameters
  • device[in] The device object.

  • error[out] Log error messages.

Returns

The protocol version of the device.

ob_cmd_version ob_device_get_cmd_version(ob_device *device, ob_property_id property_id, ob_error **error)

Get the cmdVersion of a property.

Parameters
  • device[in] The device object.

  • property_id[in] The property id.

  • error[out] Log error messages.

Returns

The cmdVersion of the property.

uint32_t ob_device_get_supported_property_count(ob_device *device, ob_error **error)

Get the number of properties supported by the device.

Parameters
  • device[in] The device object.

  • error[out] Log error messages.

Returns

The number of properties supported by the device.

ob_property_item ob_device_get_supported_property(ob_device *device, uint32_t index, ob_error **error)

Get the type of property supported by the device.

Parameters
  • device[in] The device object.

  • index[in] The property index.

  • error[out] Log error messages.

Returns

The type of property supported by the device.

bool ob_device_is_property_supported(ob_device *device, ob_property_id property_id, ob_permission_type permission, ob_error **error)

Check if a device property permission is supported.

Parameters
  • device[in] The device object.

  • property_id[in] The property id.

  • permission[in] The type of permission that needs to be interpreted.

  • error[out] Log error messages.

Returns

Whether the property permission is supported.

ob_int_property_range ob_device_get_int_property_range(ob_device *device, ob_property_id property_id, ob_error **error)

Get the integer type of device property range.

Parameters
  • device[in] The device object.

  • property_id[in] The property id.

  • error[out] Log error messages.

Returns

The property range.

ob_float_property_range ob_device_get_float_property_range(ob_device *device, ob_property_id property_id, ob_error **error)

Get the float type of device property range.

Parameters
  • device[in] The device object.

  • property_id[in] The property id.

  • error[out] Log error messages.

Returns

The property range.

ob_bool_property_range ob_device_get_bool_property_range(ob_device *device, ob_property_id property_id, ob_error **error)

Get the boolean type of device property range.

Parameters
  • device[in] The device object.

  • property_id[in] The property id.

  • error[out] Log error messages.

Returns

The property range.

void ob_device_write_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)

Write to an AHB register.

Parameters
  • device[in] The device object.

  • reg – The register to be written.

  • mask – The mask.

  • value – The value to be written.

  • error[out] Log error messages.

void ob_device_read_ahb(ob_device *device, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)

Read an AHB register.

Parameters
  • device[in] The device object.

  • reg – The register to be read.

  • mask – The mask.

  • value – The value to be read.

  • error[out] Log error messages.

void ob_device_write_i2c(ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t value, ob_error **error)

Write to an I2C register.

Parameters
  • device[in] The device object.

  • module_id – The I2C module id to be written.

  • reg – The register to be written.

  • mask – The mask.

  • value – The value to be written.

  • error[out] Log error messages.

void ob_device_read_i2c(ob_device *device, uint32_t module_id, uint32_t reg, uint32_t mask, uint32_t *value, ob_error **error)

Read an I2C register.

Parameters
  • device[in] The device object.

  • module_id – The id of the I2C module to be read.

  • reg – The register to be read.

  • mask – The mask.

  • value – The value to be read.

  • error[out] Log error messages.

void ob_device_write_flash(ob_device *device, uint32_t offset, const void *data, uint32_t data_size, ob_set_data_callback cb, bool async, void *user_data, ob_error **error)

Set the properties of writing to Flash [Asynchronous Callback].

Parameters
  • device[in] The device object.

  • offset – The flash offset address.

  • data – The property data to be written.

  • data_size – The size of the property to be written.

  • cb – The set data callback.

  • async[in] Whether to execute asynchronously.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

void ob_device_read_flash(ob_device *device, uint32_t offset, uint32_t data_size, ob_get_data_callback cb, bool async, void *user_data, ob_error **error)

Read Flash properties [asynchronous callback].

Parameters
  • device[in] The device object.

  • offset – The flash offset address.

  • data_size – The size of the data to be read.

  • cb – The read flash data and progress callback.

  • async[in] Whether to execute asynchronously.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

void ob_device_write_customer_data(ob_device *device, const void *data, uint32_t data_size, ob_error **error)

Set customer data.

Parameters
  • device[in] The device object.

  • data[in] The property data to be set.

  • data_size[in] The size of the property to be set,the maximum length cannot exceed 65532 bytes.

  • error[out] Log error messages.

void ob_device_read_customer_data(ob_device *device, void *data, uint32_t *data_size, ob_error **error)

Get customer data of a device property.

Parameters
  • device[in] The device object.

  • data[out] The obtained property data.

  • data_size[out] The size of the obtained property data.

  • error[out] Log error messages.

void ob_device_upgrade(ob_device *device, const char *path, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error)

Upgrade the device firmware.

Parameters
  • device[in] The device object.

  • path[in] The firmware path.

  • callback[in] The firmware upgrade progress callback.

  • async[in] Whether to execute asynchronously.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

void ob_device_upgrade_from_data(ob_device *device, const char *file_data, uint32_t file_size, ob_device_upgrade_callback callback, bool async, void *user_data, ob_error **error)

Upgrade the device firmware.

Parameters
  • device[in] The device object.

  • file_data[in] The firmware file data.

  • file_size[in] The firmware file size.

  • callback[in] The firmware upgrade progress callback.

  • async[in] Whether to execute asynchronously.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

ob_device_state ob_device_get_device_state(ob_device *device, ob_error **error)

Get the current device status.

Parameters
  • device[in] The device object.

  • error[out] Log error messages.

Returns

ob_device_state The device state information.

void ob_device_state_changed(ob_device *device, ob_device_state_callback callback, void *user_data, ob_error **error)

Monitor device state changes.

Parameters
  • device[in] The device object.

  • callback[in] The callback function to be called when the device status changes.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

void ob_device_send_file_to_destination(ob_device *device, const char *file_path, const char *dst_path, ob_file_send_callback callback, bool async, void *user_data, ob_error **error)

Send files to the specified path on the device.

Parameters
  • device[in] The device object.

  • file_path[in] The source file path.

  • dst_path[in] The destination path on the device.

  • callback[in] The file sending progress callback.

  • async[in] Whether to execute asynchronously.

  • user_data[in] User-defined data that will be returned in the callback.

  • error[out] Log error messages.

bool ob_device_activate_authorization(ob_device *device, const char *auth_code, ob_error **error)

Verify the device authorization code.

Parameters
  • device[in] The device object.

  • auth_code[in] The authorization code.

  • error[out] Log error messages.

Returns

bool Whether the activation is successful.

void ob_device_write_authorization_code(ob_device *device, const char *auth_code, ob_error **error)

Write the device authorization code.

Parameters
  • device[in] The device object.

  • auth_code[in] The authorization code.

  • error[out] Log error messages.

ob_camera_param_list *ob_device_get_calibration_camera_param_list(ob_device *device, ob_error **error)

Get the original parameter list of camera calibration saved on the device.

Attention

The parameters in the list do not correspond to the current open-stream configuration.You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing. Non-professional users are recommended to use the ob_pipeline_get_camera_param() interface.

Parameters
  • device[in] The device object.

  • error[out] Log error messages.

Returns

ob_camera_param_list The camera parameter list.

ob_depth_work_mode ob_device_get_current_depth_work_mode(ob_device *device, ob_error **error)

Get the current depth work mode.

Parameters
  • device[in] The device object.

  • error[out] Log error messages.

Returns

ob_depth_work_mode The current depth work mode.

ob_status ob_device_switch_depth_work_mode(ob_device *device, const ob_depth_work_mode *work_mode, ob_error **error)

Switch the depth work mode by ob_depth_work_mode. Prefer to use ob_device_switch_depth_work_mode_by_name to switch depth mode when the complete name of the depth work mode is known.

Parameters
  • device[in] The device object.

  • work_mode[in] The depth work mode from ob_depth_work_mode_list which is returned by ob_device_get_depth_work_mode_list.

  • error[out] Log error messages.

Returns

ob_status The switch result. OB_STATUS_OK: success, other failed.

ob_status ob_device_switch_depth_work_mode_by_name(ob_device *device, const char *mode_name, ob_error **error)

Switch the depth work mode by work mode name.

Parameters
  • device[in] The device object.

  • mode_name[in] The depth work mode name which is equal to ob_depth_work_mode.name.

  • error[out] Log error messages.

Returns

ob_status The switch result. OB_STATUS_OK: success, other failed.

ob_depth_work_mode_list *ob_device_get_depth_work_mode_list(ob_device *device, ob_error **error)

Request the list of supported depth work modes.

Parameters
  • device[in] The device object.

  • error[out] Log error messages.

Returns

ob_depth_work_mode_list The list of ob_depth_work_mode.

void ob_device_reboot(ob_device *device, ob_error **error)

Device reboot.

Attention

The device will be disconnected and reconnected. After the device is disconnected, the interface access to the device handle may be abnormal. Please use the ob_delete_device interface to delete the handle directly. After the device is reconnected, it can be obtained again.

Parameters
  • device[in] Device object

  • error[out] Log error messages

ob_device_sync_config ob_device_get_sync_config(ob_device *device, ob_error **error)

Get the current device synchronization configuration.

Device synchronization: including exposure synchronization function and multi-camera synchronization function of different sensors within a single machine

Parameters
  • device[in] Device object

  • error[out] Log error messages

Returns

ob_device_sync_config Return the device synchronization configuration

void ob_device_set_sync_config(ob_device *device, ob_device_sync_config device_sync_config, ob_error **error)

Set the device synchronization configuration.

Used to configure the exposure synchronization function and multi-camera synchronization function of different sensors in a single machine

Attention

Calling this function will directly write the configuration to the device Flash, and it will still take effect after the device restarts. To avoid affecting the Flash lifespan, do not update the configuration frequently.

Parameters
  • device[in] Device object

  • device_sync_config[out] Device synchronization configuration

  • error[out] Log error messages

const char *ob_device_info_name(ob_device_info *info, ob_error **error)

Get device name.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* return the device name

int ob_device_info_pid(ob_device_info *info, ob_error **error)

Get device pid.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

int return the device pid

int ob_device_info_vid(ob_device_info *info, ob_error **error)

Get device vid.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

int return device vid

const char *ob_device_info_uid(ob_device_info *info, ob_error **error)

Get device uid.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* return device uid

const char *ob_device_info_serial_number(ob_device_info *info, ob_error **error)

Get device serial number.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* return device serial number

const char *ob_device_info_firmware_version(ob_device_info *info, ob_error **error)

Get the firmware version number.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

int return the firmware version number

const char *ob_device_info_usb_type(ob_device_info *info, ob_error **error)

Get the USB connection type (DEPRECATED)

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* The USB connection type

const char *ob_device_info_connection_type(ob_device_info *info, ob_error **error)

Get the device connection type.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* The connection type,currently supports:”USB”, “USB1.0”, “USB1.1”, “USB2.0”, “USB2.1”, “USB3.0”, “USB3.1”, “USB3.2”, “Ethernet”

const char *ob_device_info_ip_address(ob_device_info *info, ob_error **error)

Get the device IP address.

Attention

Only valid for network devices, otherwise it will return “0.0.0.0”

Parameters
  • info – Device Information

  • error – Log error messages

Returns

const char* The IP address,such as “192.168.1.10”

const char *ob_device_info_hardware_version(ob_device_info *info, ob_error **error)

Get the hardware version number.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* The hardware version number

const char *ob_device_info_supported_min_sdk_version(ob_device_info *info, ob_error **error)

Get the minimum SDK version number supported by the device.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* The minimum SDK version number supported by the device

const char *ob_device_info_asicName(ob_device_info *info, ob_error **error)

Get the chip name.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

const char* The ASIC name

ob_device_type ob_device_info_device_type(ob_device_info *info, ob_error **error)

Get the device type.

Parameters
  • info[in] Device Information

  • error[out] Log error messages

Returns

ob_device_type The device type

uint32_t ob_camera_param_list_count(ob_camera_param_list *param_list, ob_error **error)

Get the number of camera parameter lists.

Parameters
  • param_list – Camera parameter list

  • error – Log error messages

Returns

uint32_t The number of lists

ob_camera_param ob_camera_param_list_get_param(ob_camera_param_list *param_list, uint32_t index, ob_error **error)

Get camera parameters from the camera parameter list.

Parameters
  • param_list – Camera parameter list

  • index – Parameter index

  • error – Log error messages

Returns

ob_camera_param The camera parameters. Since it returns the structure object directly, there is no need to provide a delete interface.

void ob_delete_camera_param_list(ob_camera_param_list *param_list, ob_error **error)

Delete the camera parameter list.

Parameters
  • param_list – Camera parameter list

  • error – Log error messages

uint32_t ob_depth_work_mode_list_count(ob_depth_work_mode_list *work_mode_list, ob_error **error)

Get the depth work mode count that ob_depth_work_mode_list hold.

ob_depth_work_mode ob_depth_work_mode_list_get_item(ob_depth_work_mode_list *work_mode_list, uint32_t index, ob_error **error)

Get the index target of ob_depth_work_mode from work_mode_list.

Parameters
  • work_mode_list[in] Data structure containing a list of ob_depth_work_mode

  • index[in] Index of the target ob_depth_work_mode

  • error[out] Log error messages

Returns

ob_depth_work_mode

void ob_delete_depth_work_mode_list(ob_depth_work_mode_list *work_mode_list, ob_error **error)

Free the resources of ob_depth_work_mode_list.

Parameters
  • work_mode_list[in] Data structure containing a list of ob_depth_work_mode

  • error[out] Log error messages

void ob_delete_data_bundle(ob_data_bundle *data_bundle, ob_error **error)

Free the resources of data_bundle which come from OrbbecSDK’s API.

Parameters
  • data_bundle – Data bundle

  • error[out] Log error messages

ob_status ob_error_status(ob_error *error)

Get the error status.

Parameters

error[in] The error object.

Returns

The error status.

const char *ob_error_message(ob_error *error)

Get the error message.

Parameters

error[in] The error object.

Returns

The error message.

const char *ob_error_function(ob_error *error)

Get the name of the API function that caused the error.

Parameters

error[in] The error object.

Returns

The name of the API function.

const char *ob_error_args(ob_error *error)

Get the error parameters.

Parameters

error[in] The error object.

Returns

The error parameters.

ob_exception_type ob_error_exception_type(ob_error *error)

Get the type of exception that caused the error.

Parameters

error[in] The error object.

Returns

The type of exception.

void ob_delete_error(ob_error *error)

Delete the error object.

Parameters

error[in] The error object to delete.

ob_filter *ob_create_pointcloud_filter(ob_error **error)

Create a PointCloud Filter.

Parameters

error[out] Log error messages.

Returns

A pointcloud_filter object.

void ob_pointcloud_filter_set_camera_param(ob_filter *filter, ob_camera_param param, ob_error **error)

Set the camera parameters for the PointCloud Filter.

Parameters
  • filter[in] A pointcloud_filter object.

  • param[in] Camera parameters.

  • error[out] Log error messages.

void ob_pointcloud_filter_set_point_format(ob_filter *filter, ob_format type, ob_error **error)

Set the point cloud type parameters for the PointCloud Filter.

Parameters
  • filter[in] A pointcloud_filter object.

  • type[in] Point cloud type: depth point cloud or RGBD point cloud.

  • error[out] Log error messages.

void ob_pointcloud_filter_set_frame_align_state(ob_filter *filter, bool state, ob_error **error)

Set the alignment state of the frames that will be input to produce the point cloud.

Parameters
  • filter[in] A pointcloud_filter object.

  • state[in] Alignment status, True: aligned; False: unaligned.

  • error[out] Log error messages.

void ob_pointcloud_filter_set_position_data_scale(ob_filter *filter, float scale, ob_error **error)

Set the point cloud data scaling factor.

Attention

Calling this function to set the scale will change the point coordinate scaling factor of the output point cloud frame: posScale = posScale / scale. The point coordinate scaling factor for the output point cloud frame can be obtained via the ob_points_frame_get_position_value_scale function.

Parameters
  • filter[in] A pointcloud_filter object.

  • scale[in] Set the point cloud coordinate data zoom factor.

  • error[out] Log error messages.

void ob_pointcloud_filter_set_color_data_normalization(ob_filter *filter, bool state, ob_error **error)

Set the point cloud color data normalization.

Parameters
  • filter[in] A pointcloud_filter object.

  • state[in] Sets whether the point cloud color data is normalized.

  • error[out] Log error messages.

void ob_pointcloud_filter_set_coordinate_system(ob_filter *filter, ob_coordinate_system_type type, ob_error **error)

Set the point cloud coordinate system.

Parameters
  • filter[in] A pointcloud_filter object.

  • type[in] Coordinate system type.

  • error[out] Log error messages.

ob_filter *ob_create_format_convert_filter(ob_error **error)

Create a format convert Filter.

Parameters

error[out] Log error messages.

Returns

A format_convert object.

void ob_format_convert_filter_set_format(ob_filter *filter, ob_convert_format type, ob_error **error)

Set the type of format conversion for the format convert Filter.

Parameters
  • filter[in] A format convert filter object.

  • type[in] Format conversion type.

  • error[out] Log error messages.

ob_filter *ob_create_compression_filter(ob_error **error)

Create a compression Filter.

Parameters

error[out] Log error messages.

Returns

A depth_filter object.

void ob_compression_filter_set_compression_params(ob_filter *filter, ob_compression_mode mode, void *params, ob_error **error)

Set the compression parameters for the compression Filter.

Parameters
  • filter[in] A compression_filter object.

  • mode[in] Compression mode OB_COMPRESSION_LOSSLESS or OB_COMPRESSION_LOSSY.

  • params[in] Compression params, struct ob_compression_params, when mode is OB_COMPRESSION_LOSSLESS, params is NULL.

  • error[out] Log error messages.

ob_filter *ob_create_decompression_filter(ob_error **error)

Create a decompression Filter.

Parameters

error[out] Log error messages.

Returns

A decompression Filter object.

void ob_filter_reset(ob_filter *filter, ob_error **error)

Reset the filter, clears the cache, and resets the state. If the asynchronous interface is used, the processing thread will also be stopped and the pending cache frames will be cleared.

Parameters
  • filter[in] A filter object.

  • error[out] Log error messages.

ob_frame *ob_filter_process(ob_filter *filter, ob_frame *frame, ob_error **error)

Process the frame (synchronous interface).

Parameters
  • filter[in] A filter object.

  • frame[in] Pointer to the frame object to be processed.

  • error[out] Log error messages.

Returns

The frame object processed by the filter.

void ob_filter_set_callback(ob_filter *filter, ob_filter_callback callback, void *user_data, ob_error **error)

Set the processing result callback function for the filter (asynchronous callback interface).

Parameters
  • filter[in] A filter object.

  • callback[in] Callback function.

  • user_data[in] Arbitrary user data pointer can be passed in and returned from the callback.

  • error[out] Log error messages.

void ob_filter_push_frame(ob_filter *filter, ob_frame *frame, ob_error **error)

Push the frame into the pending cache for the filter (asynchronous callback interface).

Parameters
  • filter[in] A filter object.

  • frame[in] Pointer to the frame object to be processed.

  • error[out] Log error messages.

void ob_delete_filter(ob_filter *filter, ob_error **error)

Delete the filter.

Parameters
  • filter[in] A filter object.

  • error[out] Log error messages.

uint64_t ob_frame_index(ob_frame *frame, ob_error **error)

Get the frame index.

Parameters
  • frame[in] Frame object

  • error[out] Log wrong message

Returns

uint64_t return the frame index

ob_format ob_frame_format(ob_frame *frame, ob_error **error)

Get the frame format.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

ob_format return the frame format

ob_frame_type ob_frame_get_type(ob_frame *frame, ob_error **error)

Get the frame type.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

ob_frame_type return the frame type

uint64_t ob_frame_time_stamp(ob_frame *frame, ob_error **error)

Get the hardware timestamp of the frame in milliseconds.

The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint64_t return the frame hardware timestamp in milliseconds

uint64_t ob_frame_time_stamp_us(ob_frame *frame, ob_error **error)

Get the hardware timestamp of the frame in microseconds.

The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint64_t return the frame hardware timestamp in microseconds

uint64_t ob_frame_system_time_stamp(ob_frame *frame, ob_error **error)

Get the system timestamp of the frame in milliseconds.

The system timestamp is the time point when the frame was received by the host, on host clock domain.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint64_t return the frame system timestamp in milliseconds

void *ob_frame_data(ob_frame *frame, ob_error **error)

Get frame data.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

void* * return frame data pointer

uint32_t ob_frame_data_size(ob_frame *frame, ob_error **error)

Get the frame data size.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint32_t return the frame data size If it is point cloud data, it return the number of bytes occupied by all point sets. If you need to find the number of points, you need to divide dataSize by the structure size of the corresponding point type.

uint32_t ob_video_frame_width(ob_frame *frame, ob_error **error)

Get video frame width.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint32_t return the frame width

uint32_t ob_video_frame_height(ob_frame *frame, ob_error **error)

Get video frame height.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

uint32_t return the frame height

void *ob_video_frame_metadata(ob_frame *frame, ob_error **error)

Get the metadata of the frame.

Parameters
  • frame[in] Video frame object

  • error[out] Log error messages

Returns

void* return the metadata pointer of the frame

uint32_t ob_video_frame_metadata_size(ob_frame *frame, ob_error **error)

Get the metadata size of the frame.

Parameters
  • frame[in] Video frame object

  • error[out] Log error messages

Returns

uint32_t return the metadata size of the frame

uint8_t ob_video_frame_pixel_available_bit_size(ob_frame *frame, ob_error **error)

Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are effective bits, and the upper 6 bits are filled with 0)

Attention

Only valid for Y8/Y10/Y11/Y12/Y14/Y16 format

Parameters
  • frame[in] video frame object

  • error[out] log error messages

Returns

uint8_t return the effective number of pixels in the pixel, or 0 if it is an unsupported format

ob_sensor_type ob_ir_frame_get_source_sensor_type(ob_frame *frame, ob_error **ob_error)

Get the source sensor type of the ir frame (left or right for dual camera)

Parameters
  • frame – Frame object

  • ob_error – Log error messages

Returns

ob_sensor_type return the source sensor type of the ir frame

float ob_depth_frame_get_value_scale(ob_frame *frame, ob_error **error)

Get the value scale of the depth frame. The pixel value of the depth frame is multiplied by the scale to give a depth value in millimeters. For example, if valueScale=0.1 and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

float The value scale of the depth frame

float ob_points_frame_get_position_value_scale(ob_frame *frame, ob_error **error)

Get the point position value scale of the points frame. The point position value of the points frame is multiplied by the scale to give a position value in millimeters. For example, if scale=0.1, the x-coordinate value of a point is x = 10000, which means that the actual x-coordinate value = x*scale = 10000*0.1 = 1000mm.

Parameters
  • frame[in] Frame object

  • error[out] Log error messages

Returns

float The position value scale of the points frame

void ob_delete_frame(ob_frame *frame, ob_error **error)

Delete a frame object.

Parameters
  • frame[in] The frame object to delete

  • error[out] Log error messages

uint32_t ob_frameset_frame_count(ob_frame *frameset, ob_error **error)

Get the number of frames contained in the frameset.

Parameters
  • frameset[in] frameset object

  • error[out] Log error messages

Returns

uint32_t return the number of frames

ob_frame *ob_frameset_depth_frame(ob_frame *frameset, ob_error **error)

Get the depth frame from the frameset.

Parameters
  • frameset[in] Frameset object.

  • error[out] Log error messages.

Returns

ob_frame* Return the depth frame.

ob_frame *ob_frameset_color_frame(ob_frame *frameset, ob_error **error)

Get the color frame from the frameset.

Parameters
  • frameset[in] Frameset object.

  • error[out] Log error messages.

Returns

ob_frame* Return the color frame.

ob_frame *ob_frameset_ir_frame(ob_frame *frameset, ob_error **error)

Get the infrared frame from the frameset.

Parameters
  • frameset[in] Frameset object.

  • error[out] Log error messages.

Returns

ob_frame* Return the infrared frame.

ob_frame *ob_frameset_points_frame(ob_frame *frameset, ob_error **error)

Get point cloud data from the frameset.

Parameters
  • frameset[in] Frameset object.

  • error[out] Log error messages.

Returns

ob_frame* Return the point cloud frame.

ob_frame *ob_frameset_get_frame(ob_frame *frameset, ob_frame_type frame_type, ob_error **error)

Get a frame of a specific type from the frameset.

Parameters
  • frameset[in] Frameset object.

  • frame_type[in] Frame type.

  • error[out] Log error messages.

Returns

ob_frame* Return the frame of the specified type, or nullptr if it does not exist.

ob_accel_value ob_accel_frame_value(ob_frame *frame, ob_error **error)

Get accelerometer frame data.

Parameters
  • frame[in] Accelerometer frame.

  • error[out] Log error messages.

Returns

ob_accel_value Return the accelerometer data.

float ob_accel_frame_temperature(ob_frame *frame, ob_error **error)

Get the temperature when acquiring the accelerometer frame.

Parameters
  • frame[in] Accelerometer frame.

  • error[out] Log error messages.

Returns

float Return the temperature value.

ob_gyro_value ob_gyro_frame_value(ob_frame *frame, ob_error **error)

Get gyroscope frame data.

Parameters
  • frame[in] Gyroscope frame.

  • error[out] Log error messages.

Returns

ob_gyro_value Return the gyroscope data.

float ob_gyro_frame_temperature(ob_frame *frame, ob_error **error)

Get the temperature when acquiring the gyroscope frame.

Parameters
  • frame[in] Gyroscope frame.

  • error[out] Log error messages.

Returns

float Return the temperature value.

void ob_frame_add_ref(ob_frame *frame, ob_error **error)

Increase the reference count of a frame object.

Parameters
  • frame[in] Frame object to increase the reference count.

  • error[out] Log error messages.

ob_frame *ob_create_frame(ob_format frame_format, int width, int height, int stride_bytes, ob_frame_type frame_type, ob_error **error)

Create an empty frame object based on the specified parameters.

Parameters
  • frame_format[in] Frame object format.

  • width[in] Frame object width.

  • height[in] Frame object height.

  • stride_bytes[in] Buffer row span.

  • frame_type[in] Frame object type.

  • error[out] Log error messages.

Returns

ob_frame* Return an empty frame object.

ob_frame *ob_create_frame_from_buffer(ob_format frame_format, uint32_t frame_width, uint32_t frame_height, uint8_t *buffer, uint32_t buffer_size, ob_frame_destroy_callback *buffer_destroy_cb, void *buffer_destroy_context, ob_error **error)

Create a frame object based on an externally created buffer.

Parameters
  • frame_format[in] Frame object format.

  • frame_width[in] Frame object width.

  • frame_height[in] Frame object height.

  • buffer[in] Frame object buffer.

  • buffer_size[in] Frame object buffer size.

  • buffer_destroy_cb[in] Destroy callback.

  • buffer_destroy_context[in] Destroy context.

  • error[out] Log error messages.

Returns

ob_frame* Return the frame object.

ob_frame *ob_create_frameset(ob_error **error)

Create an empty frameset object.

Parameters

error[out] Log error messages.

Returns

ob_frame* Return the frameset object.

void ob_frameset_push_frame(ob_frame *frameset, ob_frame_type type, ob_frame *frame, ob_error **error)

Add a frame of the specified type to the frameset.

Parameters
  • frameset[in] Frameset object.

  • type[in] Type of frame to add.

  • frame[in] Frame object to add.

  • error[out] Log error messages.

void ob_frame_set_system_time_stamp(ob_frame *frame, uint64_t system_timestamp, ob_error **error)

Set the system timestamp of a frame object.

Parameters
  • frame[in] Frame object to set the system timestamp for.

  • system_timestamp[in] System timestamp to set in milliseconds.

  • error[out] Log error messages.

void ob_frame_set_device_time_stamp(ob_frame *frame, uint64_t device_timestamp, ob_error **error)

Set the device timestamp of a frame object.

Parameters
  • frame[in] Frame object to set the device timestamp.

  • device_timestamp[in] Device timestamp to set in milliseconds.

  • error[out] Log error messages.

void ob_frame_set_device_time_stamp_us(ob_frame *frame, uint64_t device_timestamp_us, ob_error **error)

Set the device timestamp of a frame object.

Parameters
  • frame[in] Frame object to set the device timestamp for.

  • device_timestamp_us[in] Device timestamp to set in microseconds.

  • error[out] Log error messages.

ob_pipeline *ob_create_pipeline(ob_error **error)

Create a pipeline object.

Parameters

error[out] Log error messages

Returns

ob_pipeline* return the pipeline object

ob_pipeline *ob_create_pipeline_with_device(ob_device *dev, ob_error **error)

Using device objects to create pipeline objects.

Parameters
  • dev[in] Device object used to create pipeline

  • error[out] Log error messages

Returns

ob_pipeline* return the pipeline object

ob_pipeline *ob_create_pipeline_with_playback_file(const char *file_name, ob_error **error)

Use the playback file to create a pipeline object.

Parameters
  • file_name[in] The playback file path used to create the pipeline

  • error[out] Log error messages

Returns

ob_pipeline* return the pipeline object

void ob_delete_pipeline(ob_pipeline *pipeline, ob_error **error)

Delete pipeline objects.

Parameters
  • pipeline[in] The pipeline object to be deleted

  • error[out] Log error messages

void ob_pipeline_start(ob_pipeline *pipeline, ob_error **error)

Start the pipeline with default parameters.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

void ob_pipeline_start_with_config(ob_pipeline *pipeline, ob_config *config, ob_error **error)

Start the pipeline with configuration parameters.

Parameters
  • pipeline[in] pipeline object

  • config[in] Parameters to be configured

  • error[out] Log error messages

void ob_pipeline_start_with_callback(ob_pipeline *pipeline, ob_config *config, ob_frameset_callback callback, void *user_data, ob_error **error)

Start the pipeline and set the frame collection data callback.

Parameters
  • pipeline[in] pipeline object

  • config[in] Parameters to be configured

  • callback[in] Trigger a callback when all frame data in the frameset arrives

  • user_data[in] Pass in any user data and get it from the callback

  • error[out] Log error messages

void ob_pipeline_stop(ob_pipeline *pipeline, ob_error **error)

Stop pipeline.

Parameters
  • pipeline[in] pipeline object

  • error[out] Log error messages

ob_config *ob_pipeline_get_config(ob_pipeline *pipeline, ob_error **error)

Get the configuration object associated with the pipeline.

Parameters
  • pipeline[in] The pipeline object

  • error[out] Log error messages

Returns

ob_config* The configuration object

ob_frame *ob_pipeline_wait_for_frameset(ob_pipeline *pipeline, uint32_t timeout_ms, ob_error **error)

Wait for a set of frames to be returned synchronously.

Parameters
  • pipeline[in] The pipeline object

  • timeout_ms[in] The timeout for waiting (in milliseconds)

  • error[out] Log error messages

Returns

ob_frame* The frameset that was waited for. A frameset is a special frame that can be used to obtain independent frames from the set.

ob_device *ob_pipeline_get_device(ob_pipeline *pipeline, ob_error **error)

Get the device object associated with the pipeline.

Parameters
  • pipeline[in] The pipeline object

  • error[out] Log error messages

Returns

ob_device* The device object

ob_playback *ob_pipeline_get_playback(ob_pipeline *pipeline, ob_error **error)

Get the playback object associated with the pipeline.

Parameters
  • pipeline[in] The pipeline object

  • error[out] Log error messages

Returns

ob_playback* The playback object

ob_stream_profile_list *ob_pipeline_get_stream_profile_list(ob_pipeline *pipeline, ob_sensor_type sensorType, ob_error **error)

Get the stream profile list associated with the pipeline.

Parameters
  • pipeline[in] The pipeline object

  • sensorType[in] The sensor type. The supported sensor types can be obtained through the ob_device_get_sensor_list() interface.

  • error[out] Log error messages

Returns

ob_stream_profile_list* The stream profile list

void ob_pipeline_enable_frame_sync(ob_pipeline *pipeline, ob_error **error)

Enable frame synchronization.

Parameters
  • pipeline[in] The pipeline object

  • error[out] Log error messages

void ob_pipeline_disable_frame_sync(ob_pipeline *pipeline, ob_error **error)

Disable frame synchronization.

Parameters
  • pipeline[in] The pipeline object

  • error[out] Log error messages

void ob_pipeline_switch_config(ob_pipeline *pipeline, ob_config *config, ob_error **error)

Dynamically switch the corresponding configuration.

Parameters
  • pipeline[in] The pipeline object

  • config[in] The pipeline configuration

  • error[out] Log error messages

ob_camera_param ob_pipeline_get_camera_param_with_profile(ob_pipeline *pipeline, uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight, ob_error **error)

Get the current camera parameters.

Parameters
  • pipeline[in] pipeline object

  • colorWidth[in] color width

  • colorHeight[in] color height

  • depthWidth[in] depth width

  • depthHeight[in] depth height

  • error[out] Log error messages

Returns

ob_camera_param returns camera internal parameters

ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob_error **error)

Get current camera parameters.

ob_stream_profile_list *ob_get_d2c_depth_profile_list(ob_pipeline *pipeline, ob_stream_profile *color_profile, ob_align_mode align_mode, ob_error **error)

Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution.

Parameters
  • pipeline[in] The pipeline object

  • color_profile[in] The input profile of the color sensor

  • align_mode[in] The input align mode

  • error[out] Log error messages

Returns

ob_stream_profile_list* The list of D2C-enabled depth sensor resolutions

ob_rect ob_get_d2c_valid_area(ob_pipeline *pipeline, uint32_t distance, ob_error **error)

Get the valid area after D2C (DEPRECATED)

Parameters
  • pipeline[in] The pipeline object

  • distance[in] The working distance

  • error[out] Log error messages

Returns

ob_rect The area information that is valid after D2C at the working distance

ob_rect ob_get_d2c_range_valid_area(ob_pipeline *pipeline, uint32_t minimum_distance, uint32_t maximum_distance, ob_error **error)

Get the valid area between the minimum distance and maximum distance after D2C.

Parameters
  • pipeline[in] The pipeline object

  • minimum_distance[in] The minimum working distance

  • maximum_distance[in] The maximum working distance

  • error[out] Log error messages

Returns

ob_rect The area information that is valid after D2C at the working distance

void ob_pipeline_start_record(ob_pipeline *pipeline, const char *file_name, ob_error **error)

Start recording.

Parameters
  • pipeline[in] The pipeline object

  • file_name[in] The recorded file path

  • error[out] Log error messages

void ob_pipeline_stop_record(ob_pipeline *pipeline, ob_error **error)

Stop recording.

Parameters
  • pipeline[in] The pipeline object

  • error[out] Log error messages

ob_config *ob_create_config(ob_error **error)

Create the pipeline configuration.

Parameters

error[out] Log error messages

Returns

ob_config* The configuration object

void ob_delete_config(ob_config *config, ob_error **error)

Delete the pipeline configuration.

Parameters
  • config[in] The configuration to be deleted

  • error[out] Log error messages

void ob_config_enable_stream(ob_config *config, ob_stream_profile *profile, ob_error **error)

Enable the specified stream in the pipeline configuration.

Parameters
  • config[in] The pipeline configuration

  • profile[in] The stream configuration to be enabled

  • error[out] Log error messages

void ob_config_enable_all_stream(ob_config *config, ob_error **error)

Enable all streams in the pipeline configuration.

Parameters
  • config[in] The pipeline configuration

  • error[out] Log error messages

void ob_config_disable_stream(ob_config *config, ob_stream_type type, ob_error **error)

Disable a specific stream in the pipeline configuration.

Parameters
  • config[in] The pipeline configuration

  • type[in] The type of stream to be disabled

  • error[out] Log error messages

void ob_config_disable_all_stream(ob_config *config, ob_error **error)

Disable all streams in the pipeline configuration.

Parameters
  • config[in] The pipeline configuration

  • error[out] Log error messages

void ob_config_set_align_mode(ob_config *config, ob_align_mode mode, ob_error **error)

Set the alignment mode for the pipeline configuration.

Parameters
  • config[in] The pipeline configuration

  • mode[in] The alignment mode to be set

  • error[out] Log error messages

void ob_config_set_depth_scale_require(ob_config *config, bool enable, ob_error **error)

Set whether depth scaling is required after setting D2C.

Parameters
  • config[in] The pipeline configuration

  • enable[in] Whether scaling is required

  • error[out] Log error messages

void ob_config_set_d2c_target_resolution(ob_config *config, uint32_t d2c_target_width, uint32_t d2c_target_height, ob_error **error)

Set the target resolution for D2C, which is applicable when the color stream is not enabled using the OrbbecSDK and the depth needs to be D2C Note: When using the OrbbecSDK to enable the color stream, this interface should also be used to set the D2C target resolution. The configuration of the enabled color stream is preferred for D2C.

Parameters
  • config[in] The pipeline configuration

  • d2c_target_width[in] The target width for D2C

  • d2c_target_height[in] The target height for D2C

  • error[out] Log error messages

void ob_config_set_frame_aggregate_output_mode(ob_config *config, ob_frame_aggregate_output_mode mode, ob_error **error)

Set the frame aggregation output mode for the pipeline configuration.

The processing strategy when the FrameSet generated by the frame aggregation function does not contain the frames of all opened streams (which can be caused by different frame rates of each stream, or by the loss of frames of one stream): drop directly or output to the user.

Parameters
  • config[in] The pipeline configuration

  • mode[in] The frame aggregation output mode to be set (default mode is OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)

  • error[out] Log error messages

ob_recorder *ob_create_recorder(ob_error **error)

Create a recorder for data recording.

Parameters

error[out] Pointer to log error messages.

Returns

Pointer to the recorder object.

ob_recorder *ob_create_recorder_with_device(ob_device *dev, ob_error **error)

Create a recorder for data recording.

Parameters
  • dev – The device object used to create the recorder.

  • error[out] Pointer to log error messages.

Returns

Pointer to the recorder object.

void ob_delete_recorder(ob_recorder *recorder, ob_error **error)

Delete the recorder object.

Parameters
  • recorder – Pointer to the recorder object.

  • error[out] Pointer to log error messages.

void ob_recorder_start(ob_recorder *recorder, const char *filename, bool async, ob_error **error)

Start recording.

Parameters
  • recorder[in] Pointer to the recorder object.

  • filename[in] Recorded file name.

  • async[in] Whether to record asynchronously.

  • error[out] Pointer to log error messages.

void ob_recorder_stop(ob_recorder *recorder, ob_error **error)

Stop recording.

Parameters
  • recorder[in] Pointer to the recorder object.

  • error[out] Pointer to log error messages.

void ob_recorder_write_frame(ob_recorder *recorder, ob_frame *frame, ob_error **error)

Write frame data to the recorder.

Parameters
  • recorder[in] Pointer to the recorder object.

  • frame[in] Pointer to the frame data to write.

  • error[out] Pointer to log error messages.

ob_playback *ob_create_playback(const char *filename, ob_error **error)

Create a playback object.

Parameters
  • filename[in] Playback filename.

  • error[out] Pointer to log error messages.

Returns

Pointer to the playback object.

void ob_delete_playback(ob_playback *playback, ob_error **error)

Delete the playback object.

Parameters
  • playback[in] Pointer to the playback object.

  • error[out] Pointer to log error messages.

void ob_playback_start(ob_playback *playback, ob_playback_callback callback, void *user_data, ob_media_type type, ob_error **error)

Start playback, with data returned from the callback.

Parameters
  • playback[in] Pointer to the playback object.

  • callback[in] Callback function for playback data.

  • user_data[in] User data.

  • type[in] Type of playback data.

  • error[out] Pointer to log error messages.

void ob_playback_stop(ob_playback *playback, ob_error **error)

Stop playback.

Parameters
  • playback[in] Pointer to the playback object.

  • error[out] Pointer to log error messages.

void ob_set_playback_state_callback(ob_playback *playback, ob_media_state_callback callback, void *user_data, ob_error **error)

Set the playback state.

Parameters
  • playback[in] Pointer to the playback object.

  • callback[in] Playback status callback function.

  • user_data[in] User data.

  • error[out] Pointer to log error messages.

ob_device_info *ob_playback_get_device_info(ob_playback *playback, ob_error **error)

Get the device information in the recording file.

Parameters
  • playback[in] Pointer to the playback object.

  • error[out] Pointer to log error messages.

Returns

Pointer to the device information.

ob_camera_param ob_playback_get_camera_param(ob_playback *playback, ob_error **error)

Get the intrinsic and extrinsic parameter information in the recording file.

Parameters
  • playback[in] Pointer to the playback object.

  • error[out] Pointer to log error messages.

Returns

Camera intrinsic and extrinsic parameter.

ob_sensor_type ob_sensor_get_type(ob_sensor *sensor, ob_error **error)

Get the type of the sensor.

Parameters
  • sensor[in] The sensor object.

  • error[out] Logs error messages.

Returns

The sensor type.

ob_stream_profile_list *ob_sensor_get_stream_profile_list(ob_sensor *sensor, ob_error **error)

Get a list of all supported stream profiles.

Parameters
  • sensor[in] The sensor object.

  • error[out] Logs error messages.

Returns

A list of stream profiles.

void ob_sensor_start(ob_sensor *sensor, ob_stream_profile *profile, ob_frame_callback callback, void *user_data, ob_error **error)

Open the current sensor and set the callback data frame.

Parameters
  • sensor[in] The sensor object.

  • profile[in] The stream configuration information.

  • callback[in] The callback function triggered when frame data arrives.

  • user_data[in] Any user data to pass in and get from the callback.

  • error[out] Logs error messages.

void ob_sensor_stop(ob_sensor *sensor, ob_error **error)

Stop the sensor stream.

Parameters
  • sensor[in] The sensor object.

  • error[out] Logs error messages.

void ob_sensor_switch_profile(ob_sensor *sensor, ob_stream_profile *profile, ob_error **error)

Dynamically switch resolutions.

Parameters
  • sensor[in] The sensor object.

  • profile[in] The stream configuration information.

  • error[out] Logs error messages.

void ob_delete_sensor_list(ob_sensor_list *sensor_list, ob_error **error)

Delete a list of sensor objects.

Parameters
  • sensor_list[in] The list of sensor objects to delete.

  • error[out] Logs error messages.

uint32_t ob_sensor_list_get_sensor_count(ob_sensor_list *sensor_list, ob_error **error)

Get the number of sensors in the sensor list.

Parameters
  • sensor_list[in] The list of sensor objects.

  • error[out] Logs error messages.

Returns

The number of sensors in the list.

ob_sensor_type ob_sensor_list_get_sensor_type(ob_sensor_list *sensor_list, uint32_t index, ob_error **error)

Get the sensor type.

Parameters
  • sensor_list[in] The list of sensor objects.

  • index[in] The index of the sensor on the list.

  • error[out] Logs error messages.

Returns

The sensor type.

ob_sensor *ob_sensor_list_get_sensor_by_type(ob_sensor_list *sensor_list, ob_sensor_type sensorType, ob_error **error)

Get a sensor by sensor type.

Parameters
  • sensor_list[in] The list of sensor objects.

  • sensorType[in] The sensor type to be obtained.

  • error[out] Logs error messages.

Returns

The sensor pointer. If the specified type of sensor does not exist, it will return null.

ob_sensor *ob_sensor_list_get_sensor(ob_sensor_list *sensor_list, uint32_t index, ob_error **error)

Get a sensor by index number.

Parameters
  • sensor_list[in] The list of sensor objects.

  • index[in] The index of the sensor on the list.

  • error[out] Logs error messages.

Returns

The sensor object.

void ob_delete_sensor(ob_sensor *sensor, ob_error **error)

Delete a sensor object.

Parameters
  • sensor[in] The sensor object to delete.

  • error[out] Logs error messages.

ob_format ob_stream_profile_format(ob_stream_profile *profile, ob_error **error)

Get stream profile format.

Parameters
  • profile[in] Stream configuration object

  • error[out] Log error messages

Returns

ob_format return the format of the stream

ob_stream_type ob_stream_profile_type(ob_stream_profile *profile, ob_error **error)

Get stream profile type.

Parameters
  • profile[in] Stream configuration object

  • error[out] Log error messages

Returns

ob_stream_type stream type

uint32_t ob_video_stream_profile_fps(ob_stream_profile *profile, ob_error **error)

Get the frame rate of the video stream configuration.

Parameters
  • profile[in] Stream configuration object

  • error[out] Log error messages

Returns

uint32_t return the frame rate of the stream

uint32_t ob_video_stream_profile_width(ob_stream_profile *profile, ob_error **error)

Get the width of the video stream configuration.

Parameters
  • profile[in] Stream configuration object, if the configuration is not a video stream configuration, an error will be returned

  • error[out] Log error messages

Returns

uint32_t return the width of the stream

uint32_t ob_video_stream_profile_height(ob_stream_profile *profile, ob_error **error)

Get the height of the video stream configuration.

Parameters
  • profile[in] Stream configuration object, if the configuration is not a video stream configuration, an error will be returned

  • error[out] Log error messages

Returns

uint32_t return the height of the stream

ob_accel_full_scale_range ob_accel_stream_profile_full_scale_range(ob_stream_profile *profile, ob_error **error)

Get the full-scale range of the accelerometer stream.

Parameters
  • profile[in] Stream configuration object. If the configuration is not for the accelerometer stream, an error will be returned.

  • error[out] Log error messages.

Returns

The full-scale range of the accelerometer stream.

ob_accel_sample_rate ob_accel_stream_profile_sample_rate(ob_stream_profile *profile, ob_error **error)

Get the sampling frequency of the accelerometer frame.

Parameters
  • profile[in] Stream configuration object. If the configuration is not for the accelerometer stream, an error will be returned.

  • error[out] Log error messages.

Returns

The sampling frequency of the accelerometer frame.

ob_gyro_full_scale_range ob_gyro_stream_profile_full_scale_range(ob_stream_profile *profile, ob_error **error)

Get the full-scale range of the gyroscope stream.

Parameters
  • profile[in] Stream configuration object. If the configuration is not for the gyroscope stream, an error will be returned.

  • error[out] Log error messages.

Returns

The full-scale range of the gyroscope stream.

ob_gyro_sample_rate ob_gyro_stream_profile_sample_rate(ob_stream_profile *profile, ob_error **error)

Get the sampling frequency of the gyroscope stream.

Parameters
  • profile[in] Stream configuration object. If the configuration is not for the gyroscope stream, an error will be returned.

  • error[out] Log error messages.

Returns

The sampling frequency of the gyroscope stream.

ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(ob_stream_profile_list *profile_list, int width, int height, ob_format format, int fps, ob_error **error)

Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches, the first one in the list will be returned by default. If no matched profile is found, an error will be returned.

Parameters
  • profile_list[in] Resolution list.

  • width[in] Width. If you don’t need to add matching conditions, you can pass 0.

  • height[in] Height. If you don’t need to add matching conditions, you can pass 0.

  • format[in] Format. If you don’t need to add matching conditions, you can pass OB_FORMAT_UNKNOWN.

  • fps[in] Frame rate. If you don’t need to add matching conditions, you can pass 0.

  • error[out] Log error messages.

Returns

The matching profile.

ob_stream_profile *ob_stream_profile_list_get_accel_stream_profile(ob_stream_profile_list *profile_list, ob_accel_full_scale_range fullScaleRange, ob_accel_sample_rate sampleRate, ob_error **error)

Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches, the first one in the list will be returned by default. If no matched profile is found, an error will be returned.

Parameters
  • profile_list[in] Resolution list.

  • fullScaleRange[in] Full-scale range. If you don’t need to add matching conditions, you can pass 0.

  • sampleRate[in] Sample rate. If you don’t need to add matching conditions, you can pass 0.

  • error[out] Log error messages.

Returns

The matching profile.

ob_stream_profile *ob_stream_profile_list_get_gyro_stream_profile(ob_stream_profile_list *profile_list, ob_gyro_full_scale_range fullScaleRange, ob_gyro_sample_rate sampleRate, ob_error **error)

Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches, the first one in the list will be returned by default. If no matched profile is found, an error will be returned.

Parameters
  • profile_list[in] Resolution list.

  • fullScaleRange[in] Full-scale range. If you don’t need to add matching conditions, you can pass 0.

  • sampleRate[in] Sample rate. If you don’t need to add matching conditions, you can pass 0.

  • error[out] Log error messages.

Returns

The matching profile.

ob_stream_profile *ob_stream_profile_list_get_profile(ob_stream_profile_list *profile_list, int index, ob_error **error)

Get the corresponding StreamProfile by subscripting.

Parameters
  • profile_list[in] StreamProfile lists.

  • index[in] Index.

  • error[out] Log error messages.

Returns

The matching profile.

uint32_t ob_stream_profile_list_count(ob_stream_profile_list *profile_list, ob_error **error)

Get the number of StreamProfile lists.

Parameters
  • profile_list[in] StreamProfile list.

  • error[out] Log error messages.

Returns

The number of StreamProfile lists.

void ob_delete_stream_profile_list(ob_stream_profile_list *profile_list, ob_error **error)

Delete the stream profile list.

Parameters
  • profile_list[in] Stream configuration list.

  • error[out] Log error messages.

void ob_delete_stream_profile(ob_stream_profile *profile, ob_error **error)

Delete the stream configuration.

Parameters
  • profile[in] Stream configuration object.

  • error[out] Log error messages.

int ob_get_version()

Get the SDK version number.

Returns

int The SDK version number.

int ob_get_major_version()

Get the SDK major version number.

Returns

int The SDK major version number.

int ob_get_minor_version()

Get the SDK minor version number.

Returns

int The SDK minor version number.

int ob_get_patch_version()

Get the SDK patch version number.

Returns

int The SDK patch version number.

const char *ob_get_stage_version()

Get the SDK stage version.

Attention

The returned char* does not need to be freed.

Returns

const char* The SDK stage version.